uspot: accounting: cleanup ratelimit rules on removal

When a client is removed, call ratelimit client_delete to remove any
lingering related bandwidth limits.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
This commit is contained in:
Thibaut VARÈNE
2023-05-30 12:20:21 +02:00
committed by John Crispin
parent 5d0f75f68e
commit 5d93a1ddc0

View File

@@ -243,6 +243,8 @@ function client_kick(interface, mac, remove) {
function client_remove(interface, mac, reason) {
syslog(interface, mac, reason);
client_kick(interface, mac, true);
// delete ratelimit rules if any - ratelimit gets lc mac from portal
ubus.call('ratelimit', 'client_delete', { address: lc(mac) });
}
function client_reset(interface, mac, reason) {