From 09d88ad91c62bd00a24ea75d41d340e5bcc2d8b8 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 2 Jun 2022 10:55:11 +0200 Subject: mod/bridge-port-vlan: show vlan name in log message --- mod/bridge-port-vlan | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mod/bridge-port-vlan') diff --git a/mod/bridge-port-vlan b/mod/bridge-port-vlan index 13352b5..efdaab8 100644 --- a/mod/bridge-port-vlan +++ b/mod/bridge-port-vlan @@ -36,6 +36,7 @@ /ip/dhcp-client/enable $DHCPClient; } } else={ + :local VlanName $Vlan; :if ($Vlan != [ :tostr [ :tonum $Vlan ] ]) do={ :do { :set $Vlan ([ /interface/bridge/vlan/get [ find where comment=$Vlan ] vlan-ids ]->0); @@ -45,7 +46,7 @@ } :if ($BridgePortVal->"disabled" = true || $Vlan != $BridgePortVal->"pvid") do={ $LogPrintExit2 info $0 ("Enabling bridge port for interface " . $BridgePortVal->"interface" . ", changing to " . $ConfigTo . \ - " vlan " . $Vlan . ", disabling dhcp client.") false; + " vlan " . $Vlan . [ $IfThenElse ($Vlan != $VlanName) (" (" . $VlanName . ")") ] . ", disabling dhcp client.") false; :if ([ :len $DHCPClient ] = 1) do={ /ip/dhcp-client/disable $DHCPClient; :delay 200ms; -- cgit v1.2.3-70-g09d2