From 5d93a1ddc0cbc35a8c7cefe0dd724d07f70ee84b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibaut=20VAR=C3=88NE?= Date: Tue, 30 May 2023 12:20:21 +0200 Subject: [PATCH] uspot: accounting: cleanup ratelimit rules on removal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When a client is removed, call ratelimit client_delete to remove any lingering related bandwidth limits. Signed-off-by: Thibaut VARĂˆNE --- feeds/ucentral/uspot/files/usr/share/uspot/accounting.uc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/feeds/ucentral/uspot/files/usr/share/uspot/accounting.uc b/feeds/ucentral/uspot/files/usr/share/uspot/accounting.uc index 3ae079160..c6a3cbdbb 100755 --- a/feeds/ucentral/uspot/files/usr/share/uspot/accounting.uc +++ b/feeds/ucentral/uspot/files/usr/share/uspot/accounting.uc @@ -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) {