mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-10-29 01:22:25 +00:00
ratelimit: allow flushing all default values
Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
@@ -15,6 +15,7 @@ add_rate() {
|
||||
|
||||
reload_service() {
|
||||
logger ratelimit reload
|
||||
ubus call ratelimit flush
|
||||
config_load ratelimit
|
||||
config_foreach add_rate rate
|
||||
}
|
||||
|
||||
@@ -212,6 +212,14 @@ function run_service() {
|
||||
let uctx = ubus.connect();
|
||||
|
||||
uctx.publish("ratelimit", {
|
||||
flush: {
|
||||
call: function(req) {
|
||||
defaults = {};
|
||||
},
|
||||
args: {
|
||||
|
||||
}
|
||||
},
|
||||
defaults_set: {
|
||||
call: function(req) {
|
||||
let r_i = req.args.rate_ingress ?? req.args.rate;
|
||||
|
||||
Reference in New Issue
Block a user