hotspot-to-wpa-cleanup: use the timeout in message...

... not the actual value.
This commit is contained in:
Christian Hesse 2024-11-12 17:53:30 +01:00
parent a545d0d39e
commit f1533b8962
3 changed files with 3 additions and 3 deletions

View file

@ -65,7 +65,7 @@
server=$Server last-seen>$Timeout comment~"^hotspot-to-wpa:" ] do={ server=$Server last-seen>$Timeout comment~"^hotspot-to-wpa:" ] do={
:local LeaseVal [ /ip/dhcp-server/lease/get $Lease ]; :local LeaseVal [ /ip/dhcp-server/lease/get $Lease ];
$LogPrint info $ScriptName ("Client with mac address " . ($LeaseVal->"mac-address") . \ $LogPrint info $ScriptName ("Client with mac address " . ($LeaseVal->"mac-address") . \
" was not seen for " . ($LeaseVal->"last-seen") . ", removing."); " was not seen for " . $Timeout . ", removing.");
/caps-man/access-list/remove [ find where comment~"^hotspot-to-wpa:" \ /caps-man/access-list/remove [ find where comment~"^hotspot-to-wpa:" \
mac-address=($LeaseVal->"mac-address") ]; mac-address=($LeaseVal->"mac-address") ];
/ip/dhcp-server/lease/remove $Lease; /ip/dhcp-server/lease/remove $Lease;

View file

@ -71,7 +71,7 @@
server=$Server last-seen>$Timeout comment~"^hotspot-to-wpa:" ] do={ server=$Server last-seen>$Timeout comment~"^hotspot-to-wpa:" ] do={
:local LeaseVal [ /ip/dhcp-server/lease/get $Lease ]; :local LeaseVal [ /ip/dhcp-server/lease/get $Lease ];
$LogPrint info $ScriptName ("Client with mac address " . ($LeaseVal->"mac-address") . \ $LogPrint info $ScriptName ("Client with mac address " . ($LeaseVal->"mac-address") . \
" was not seen for " . ($LeaseVal->"last-seen") . ", removing."); " was not seen for " . $Timeout . ", removing.");
/caps-man/access-list/remove [ find where comment~"^hotspot-to-wpa:" \ /caps-man/access-list/remove [ find where comment~"^hotspot-to-wpa:" \
/interface/wifi/access-list/remove [ find where comment~"^hotspot-to-wpa:" \ /interface/wifi/access-list/remove [ find where comment~"^hotspot-to-wpa:" \
mac-address=($LeaseVal->"mac-address") ]; mac-address=($LeaseVal->"mac-address") ];

View file

@ -65,7 +65,7 @@
server=$Server last-seen>$Timeout comment~"^hotspot-to-wpa:" ] do={ server=$Server last-seen>$Timeout comment~"^hotspot-to-wpa:" ] do={
:local LeaseVal [ /ip/dhcp-server/lease/get $Lease ]; :local LeaseVal [ /ip/dhcp-server/lease/get $Lease ];
$LogPrint info $ScriptName ("Client with mac address " . ($LeaseVal->"mac-address") . \ $LogPrint info $ScriptName ("Client with mac address " . ($LeaseVal->"mac-address") . \
" was not seen for " . ($LeaseVal->"last-seen") . ", removing."); " was not seen for " . $Timeout . ", removing.");
/interface/wifi/access-list/remove [ find where comment~"^hotspot-to-wpa:" \ /interface/wifi/access-list/remove [ find where comment~"^hotspot-to-wpa:" \
mac-address=($LeaseVal->"mac-address") ]; mac-address=($LeaseVal->"mac-address") ];
/ip/dhcp-server/lease/remove $Lease; /ip/dhcp-server/lease/remove $Lease;