aboutsummaryrefslogtreecommitdiffstats
path: root/learn-mac-based-vlan
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2018-11-09 21:35:56 +0100
committerGravatar Christian Hesse <mail@eworm.de>2018-11-09 21:35:56 +0100
commit7fcb253f323b80a90a4f934717fd293afe4caa60 (patch)
tree1874dff0e858153372741186d25d25eaceaca53f /learn-mac-based-vlan
parentcb08d5280b32821a716da9a6fa12f147e76209c3 (diff)
downloadrouteros-scripts-7fcb253f323b80a90a4f934717fd293afe4caa60.tar.gz
routeros-scripts-7fcb253f323b80a90a4f934717fd293afe4caa60.tar.zst
learn-mac-based-vlan: move log inside condition
Diffstat (limited to 'learn-mac-based-vlan')
-rw-r--r--learn-mac-based-vlan5
1 files changed, 2 insertions, 3 deletions
diff --git a/learn-mac-based-vlan b/learn-mac-based-vlan
index fa43299..82e3ca5 100644
--- a/learn-mac-based-vlan
+++ b/learn-mac-based-vlan
@@ -6,8 +6,7 @@
:local NewVlanId 33;
-/ log info ("MAC-based-VLAN: learning MAC address " . $leaseActMAC . " for VLAN " . $NewVlanId . ".");
-
:if ( [ / interface ethernet switch mac-based-vlan print count-only where src-mac-address=$leaseActMAC ] = 0 ) do={
+ :log info ("MAC-based-VLAN: learning MAC address " . $leaseActMAC . " for VLAN " . $NewVlanId . ".");
/ interface ethernet switch mac-based-vlan add src-mac-address=$leaseActMAC new-customer-vid=$NewVlanId;
-};
+}