From 2d13c066f36c3044ae6dc30675f0fc3b73d8edab Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 31 Jul 2026 23:55:40 +0200 Subject: [PATCH] hotspot-to-wpa-lease: add extra verification for lease --- hotspot-to-wpa-lease.capsman.rsc | 4 ++++ hotspot-to-wpa-lease.template.rsc | 4 ++++ hotspot-to-wpa-lease.wifi.rsc | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/hotspot-to-wpa-lease.capsman.rsc b/hotspot-to-wpa-lease.capsman.rsc index 6c3968bd..ae04e7f1 100644 --- a/hotspot-to-wpa-lease.capsman.rsc +++ b/hotspot-to-wpa-lease.capsman.rsc @@ -39,6 +39,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={ diff --git a/hotspot-to-wpa-lease.template.rsc b/hotspot-to-wpa-lease.template.rsc index ab7ca2a3..2ad5198b 100644 --- a/hotspot-to-wpa-lease.template.rsc +++ b/hotspot-to-wpa-lease.template.rsc @@ -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={ diff --git a/hotspot-to-wpa-lease.wifi.rsc b/hotspot-to-wpa-lease.wifi.rsc index b657be62..969937a4 100644 --- a/hotspot-to-wpa-lease.wifi.rsc +++ b/hotspot-to-wpa-lease.wifi.rsc @@ -39,6 +39,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={