hotspot-to-wpa-lease: add extra verification for lease

This commit is contained in:
Christian Hesse 2026-07-31 23:55:40 +02:00
parent fd50428e1f
commit 2d13c066f3
3 changed files with 12 additions and 0 deletions

View file

@ -43,6 +43,10 @@
:local LeaseVal [ $ParseKeyValueStore [ /ip/dhcp-server/lease/get $Lease comment ] ];
/ip/dhcp-server/lease/remove $Lease;
:if (($LeaseVal->"hotspot-to-wpa") != true) do={
:continue;
}
:local Date [ /system/clock/get date ];
:local UserVal ({});
:if ([ :len [ /ip/hotspot/user/find where name=($LeaseVal->"username") ] ] > 0) do={