aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mod/bridge-port-to7
1 files changed, 5 insertions, 2 deletions
diff --git a/mod/bridge-port-to b/mod/bridge-port-to
index d53283d..efeb02a 100644
--- a/mod/bridge-port-to
+++ b/mod/bridge-port-to
@@ -44,9 +44,12 @@
/ip/dhcp-client/disable $DHCPClient;
:delay 200ms;
}
- /interface/ethernet/disable [ find where name=$BridgePortVal->"interface" ];
+ :local Disable [ /interface/ethernet/find where name=$BridgePortVal->"interface" ];
+ :if ([ :len $Disable ] > 0) do={
+ /interface/ethernet/disable $Disable;
+ :set InterfaceReEnable ($InterfaceReEnable, $BridgePortVal->"interface");
+ }
/interface/bridge/port/set disabled=no bridge=$BridgeDefault $BridgePort;
- :set InterfaceReEnable ($InterfaceReEnable, $BridgePortVal->"interface");
} else={
$LogPrintExit2 debug $0 ("Interface " . $BridgePortVal->"interface" . " already connected to " . $BridgePortTo . \
" bridge " . $BridgeDefault . ".") false;