From 964ec39a68310a2ccd4c097dd486182f933ba8c8 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 8 Jun 2023 21:58:06 +0200 Subject: collect-wireless-mac: use 'active-' properties from lease --- collect-wireless-mac.capsman.rsc | 4 ++-- collect-wireless-mac.local.rsc | 4 ++-- collect-wireless-mac.template.rsc | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/collect-wireless-mac.capsman.rsc b/collect-wireless-mac.capsman.rsc index 094ffc0..c6cae9c 100644 --- a/collect-wireless-mac.capsman.rsc +++ b/collect-wireless-mac.capsman.rsc @@ -51,9 +51,9 @@ $ScriptLock $0 false 10; :local Address "no dhcp lease"; :local DnsName "no dhcp lease"; :local HostName "no dhcp lease"; - :local Lease ([ /ip/dhcp-server/lease/find where mac-address=($RegVal->"mac-address") dynamic=yes status=bound ]->0); + :local Lease ([ /ip/dhcp-server/lease/find where active-mac-address=($RegVal->"mac-address") dynamic=yes status=bound ]->0); :if ([ :len $Lease ] > 0) do={ - :set Address [ /ip/dhcp-server/lease/get $Lease address ]; + :set Address [ /ip/dhcp-server/lease/get $Lease active-address ]; :set HostName [ $EitherOr [ /ip/dhcp-server/lease/get $Lease host-name ] "no hostname" ]; :set DnsName "no dns name"; :local DnsRec ([ /ip/dns/static/find where address=$Address ]->0); diff --git a/collect-wireless-mac.local.rsc b/collect-wireless-mac.local.rsc index 23eb9fa..fa8fe8d 100644 --- a/collect-wireless-mac.local.rsc +++ b/collect-wireless-mac.local.rsc @@ -51,9 +51,9 @@ $ScriptLock $0 false 10; :local Address "no dhcp lease"; :local DnsName "no dhcp lease"; :local HostName "no dhcp lease"; - :local Lease ([ /ip/dhcp-server/lease/find where mac-address=($RegVal->"mac-address") dynamic=yes status=bound ]->0); + :local Lease ([ /ip/dhcp-server/lease/find where active-mac-address=($RegVal->"mac-address") dynamic=yes status=bound ]->0); :if ([ :len $Lease ] > 0) do={ - :set Address [ /ip/dhcp-server/lease/get $Lease address ]; + :set Address [ /ip/dhcp-server/lease/get $Lease active-address ]; :set HostName [ $EitherOr [ /ip/dhcp-server/lease/get $Lease host-name ] "no hostname" ]; :set DnsName "no dns name"; :local DnsRec ([ /ip/dns/static/find where address=$Address ]->0); diff --git a/collect-wireless-mac.template.rsc b/collect-wireless-mac.template.rsc index a8983d9..6f9efc5 100644 --- a/collect-wireless-mac.template.rsc +++ b/collect-wireless-mac.template.rsc @@ -52,9 +52,9 @@ $ScriptLock $0 false 10; :local Address "no dhcp lease"; :local DnsName "no dhcp lease"; :local HostName "no dhcp lease"; - :local Lease ([ /ip/dhcp-server/lease/find where mac-address=($RegVal->"mac-address") dynamic=yes status=bound ]->0); + :local Lease ([ /ip/dhcp-server/lease/find where active-mac-address=($RegVal->"mac-address") dynamic=yes status=bound ]->0); :if ([ :len $Lease ] > 0) do={ - :set Address [ /ip/dhcp-server/lease/get $Lease address ]; + :set Address [ /ip/dhcp-server/lease/get $Lease active-address ]; :set HostName [ $EitherOr [ /ip/dhcp-server/lease/get $Lease host-name ] "no hostname" ]; :set DnsName "no dns name"; :local DnsRec ([ /ip/dns/static/find where address=$Address ]->0); -- cgit v1.2.3-70-g09d2