This commit is contained in:
Christian Hesse 2026-07-31 21:47:46 +02:00
parent 94ea51da09
commit 8678792837
3 changed files with 6 additions and 6 deletions

View file

@ -37,7 +37,6 @@
:foreach Lease in=[ /ip/dhcp-server/lease/find where !dynamic disabled comment~"\\bhotspot-to-wpa\\b" ] do={ :foreach Lease in=[ /ip/dhcp-server/lease/find where !dynamic disabled comment~"\\bhotspot-to-wpa\\b" ] do={
:local LeaseVal [ $ParseKeyValueStore [ /ip/dhcp-server/lease/get $Lease comment ] ]; :local LeaseVal [ $ParseKeyValueStore [ /ip/dhcp-server/lease/get $Lease comment ] ];
/ip/dhcp-server/lease/remove $Lease;
:if (($LeaseVal->"hotspot-to-wpa") != true) do={ :if (($LeaseVal->"hotspot-to-wpa") != true) do={
:continue; :continue;
@ -52,7 +51,8 @@
:set UserVal [ /ip/hotspot/user/get [ find where name=$UserName ] ]; :set UserVal [ /ip/hotspot/user/get [ find where name=$UserName ] ];
} }
:local UserInfo [ $ParseKeyValueStore ($UserVal->"comment") ]; :local UserInfo [ $ParseKeyValueStore ($UserVal->"comment") ];
:local Hotspot [ /ip/hotspot/host/get [ find where mac-address=$MacAddress ] server ]; :local Hotspot [ /ip/hotspot/host/get [ find where mac-address=$MacAddress authorized ] server ];
/ip/dhcp-server/lease/remove $Lease;
:if ([ :len [ /caps-man/access-list/find where \ :if ([ :len [ /caps-man/access-list/find where \
comment=("hotspot-to-wpa template " . $Hotspot) disabled ] ] = 0) do={ comment=("hotspot-to-wpa template " . $Hotspot) disabled ] ] = 0) do={

View file

@ -41,7 +41,6 @@
:foreach Lease in=[ /ip/dhcp-server/lease/find where !dynamic disabled comment~"\\bhotspot-to-wpa\\b" ] do={ :foreach Lease in=[ /ip/dhcp-server/lease/find where !dynamic disabled comment~"\\bhotspot-to-wpa\\b" ] do={
:local LeaseVal [ $ParseKeyValueStore [ /ip/dhcp-server/lease/get $Lease comment ] ]; :local LeaseVal [ $ParseKeyValueStore [ /ip/dhcp-server/lease/get $Lease comment ] ];
/ip/dhcp-server/lease/remove $Lease;
:if (($LeaseVal->"hotspot-to-wpa") != true) do={ :if (($LeaseVal->"hotspot-to-wpa") != true) do={
:continue; :continue;
@ -56,7 +55,8 @@
:set UserVal [ /ip/hotspot/user/get [ find where name=$UserName ] ]; :set UserVal [ /ip/hotspot/user/get [ find where name=$UserName ] ];
} }
:local UserInfo [ $ParseKeyValueStore ($UserVal->"comment") ]; :local UserInfo [ $ParseKeyValueStore ($UserVal->"comment") ];
:local Hotspot [ /ip/hotspot/host/get [ find where mac-address=$MacAddress ] server ]; :local Hotspot [ /ip/hotspot/host/get [ find where mac-address=$MacAddress authorized ] server ];
/ip/dhcp-server/lease/remove $Lease;
:if ([ :len [ /caps-man/access-list/find where \ :if ([ :len [ /caps-man/access-list/find where \
:if ([ :len [ /interface/wifi/access-list/find where \ :if ([ :len [ /interface/wifi/access-list/find where \

View file

@ -37,7 +37,6 @@
:foreach Lease in=[ /ip/dhcp-server/lease/find where !dynamic disabled comment~"\\bhotspot-to-wpa\\b" ] do={ :foreach Lease in=[ /ip/dhcp-server/lease/find where !dynamic disabled comment~"\\bhotspot-to-wpa\\b" ] do={
:local LeaseVal [ $ParseKeyValueStore [ /ip/dhcp-server/lease/get $Lease comment ] ]; :local LeaseVal [ $ParseKeyValueStore [ /ip/dhcp-server/lease/get $Lease comment ] ];
/ip/dhcp-server/lease/remove $Lease;
:if (($LeaseVal->"hotspot-to-wpa") != true) do={ :if (($LeaseVal->"hotspot-to-wpa") != true) do={
:continue; :continue;
@ -52,7 +51,8 @@
:set UserVal [ /ip/hotspot/user/get [ find where name=$UserName ] ]; :set UserVal [ /ip/hotspot/user/get [ find where name=$UserName ] ];
} }
:local UserInfo [ $ParseKeyValueStore ($UserVal->"comment") ]; :local UserInfo [ $ParseKeyValueStore ($UserVal->"comment") ];
:local Hotspot [ /ip/hotspot/host/get [ find where mac-address=$MacAddress ] server ]; :local Hotspot [ /ip/hotspot/host/get [ find where mac-address=$MacAddress authorized ] server ];
/ip/dhcp-server/lease/remove $Lease;
:if ([ :len [ /interface/wifi/access-list/find where \ :if ([ :len [ /interface/wifi/access-list/find where \
comment=("hotspot-to-wpa template " . $Hotspot) disabled ] ] = 0) do={ comment=("hotspot-to-wpa template " . $Hotspot) disabled ] ] = 0) do={