From 11c86985d340537db08073b240a87efe3dfd9cf7 Mon Sep 17 00:00:00 2001 From: PolynomialDivision Date: Fri, 1 Jun 2018 00:43:49 +0200 Subject: [PATCH] add option to remove kicking --- files/dawn.config | 1 + src/include/datastorage.h | 1 + src/utils/dawn_uci.c | 1 + src/utils/ubus.c | 2 +- 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/files/dawn.config b/files/dawn.config index 788d94b..f481ee1 100644 --- a/files/dawn.config +++ b/files/dawn.config @@ -46,6 +46,7 @@ config metric option eval_probe_req '1' option eval_auth_req '1' # no real reasoncode... option eval_assoc_req '1' # just deny assocs... + opgion kicking '1' option deny_auth_reason '1' # unspecified option deny_assoc_reason '17' # assoc rejected can't handle new station option use_driver_recog '1' diff --git a/src/include/datastorage.h b/src/include/datastorage.h index 599d72d..66d4ade 100644 --- a/src/include/datastorage.h +++ b/src/include/datastorage.h @@ -61,6 +61,7 @@ struct probe_metric_s { int use_driver_recog; int min_kick_count; int chan_util_avg_period; + int kicking; }; struct time_config_s { diff --git a/src/utils/dawn_uci.c b/src/utils/dawn_uci.c index 931ddc7..6292c0b 100644 --- a/src/utils/dawn_uci.c +++ b/src/utils/dawn_uci.c @@ -49,6 +49,7 @@ struct probe_metric_s uci_get_dawn_metric() { struct uci_section *s = uci_to_section(e); if (strcmp(s->type, "metric") == 0) { + ret.kicking = uci_lookup_option_int(uci_ctx, s, "kicking"); ret.ht_support = uci_lookup_option_int(uci_ctx, s, "ht_support"); ret.vht_support = uci_lookup_option_int(uci_ctx, s, "vht_support"); ret.no_ht_support = uci_lookup_option_int(uci_ctx, s, "no_ht_support"); diff --git a/src/utils/ubus.c b/src/utils/ubus.c index 6c06f56..9c5e24d 100644 --- a/src/utils/ubus.c +++ b/src/utils/ubus.c @@ -952,7 +952,7 @@ int parse_to_clients(struct blob_attr *msg, int do_kick, uint32_t id) { insert_to_ap_array(ap_entry); - if (do_kick) { + if (do_kick && dawn_metric.kicking) { kick_clients(ap_entry.bssid_addr, id); } }