add option to remove kicking

This commit is contained in:
PolynomialDivision 2018-06-01 00:43:49 +02:00
parent 9dde60a794
commit 11c86985d3
4 changed files with 4 additions and 1 deletions

View file

@ -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'

View file

@ -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 {

View file

@ -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");

View file

@ -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);
}
}