From 7fcb253f323b80a90a4f934717fd293afe4caa60 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 9 Nov 2018 21:35:56 +0100 Subject: learn-mac-based-vlan: move log inside condition --- learn-mac-based-vlan | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'learn-mac-based-vlan') 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; -}; +} -- cgit v1.2.3-70-g09d2