mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-11-02 03:17:48 +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() {
|
reload_service() {
|
||||||
logger ratelimit reload
|
logger ratelimit reload
|
||||||
|
ubus call ratelimit flush
|
||||||
config_load ratelimit
|
config_load ratelimit
|
||||||
config_foreach add_rate rate
|
config_foreach add_rate rate
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -212,6 +212,14 @@ function run_service() {
|
|||||||
let uctx = ubus.connect();
|
let uctx = ubus.connect();
|
||||||
|
|
||||||
uctx.publish("ratelimit", {
|
uctx.publish("ratelimit", {
|
||||||
|
flush: {
|
||||||
|
call: function(req) {
|
||||||
|
defaults = {};
|
||||||
|
},
|
||||||
|
args: {
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
defaults_set: {
|
defaults_set: {
|
||||||
call: function(req) {
|
call: function(req) {
|
||||||
let r_i = req.args.rate_ingress ?? req.args.rate;
|
let r_i = req.args.rate_ingress ?? req.args.rate;
|
||||||
|
|||||||
Reference in New Issue
Block a user