aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mod/bridge-port-vlan7
1 files changed, 5 insertions, 2 deletions
diff --git a/mod/bridge-port-vlan b/mod/bridge-port-vlan
index f8acca8..a79bda0 100644
--- a/mod/bridge-port-vlan
+++ b/mod/bridge-port-vlan
@@ -52,9 +52,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 pvid=$Vlan $BridgePort;
- :set InterfaceReEnable ($InterfaceReEnable, $BridgePortVal->"interface");
} else={
$LogPrintExit2 debug $0 ("Interface " . $BridgePortVal->"interface" . " already connected to " . $ConfigTo . \
" vlan " . $Vlan . ".") false;