aboutsummaryrefslogtreecommitdiffstats
path: root/mod/bridge-port-to
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2022-05-16 22:48:26 +0200
committerGravatar Christian Hesse <mail@eworm.de>2022-05-16 22:48:26 +0200
commit8c31a06b39fbb8c103a9f9e63be56f1bf47d914c (patch)
tree0b689a63b0a6bc296e8b9f067f9957ffc6785ed7 /mod/bridge-port-to
parent4e7c1df7ee2d4af96be78f76fc6d9a00e7f367ed (diff)
mod/bridge-port-to: add interface down and up
This helps the client to detect the change.
Diffstat (limited to 'mod/bridge-port-to')
-rw-r--r--mod/bridge-port-to3
1 files changed, 3 insertions, 0 deletions
diff --git a/mod/bridge-port-to b/mod/bridge-port-to
index c2ab55b..36b827b 100644
--- a/mod/bridge-port-to
+++ b/mod/bridge-port-to
@@ -42,7 +42,10 @@
/ip/dhcp-client/disable $DHCPClient;
:delay 200ms;
}
+ /interface/ethernet/disable [ find where name=$BridgePortVal->"interface" ];
/interface/bridge/port/set disabled=no bridge=$BridgeDefault $BridgePort;
+ :delay 500ms;
+ /interface/ethernet/enable [ find where name=$BridgePortVal->"interface" ];
} else={
$LogPrintExit2 debug $0 ("Interface " . $BridgePortVal->"interface" . " already connected to " . $BridgePortTo . \
" bridge " . $BridgeDefault . ".") false;