diff --git a/openwrt/usteer/files/etc/init.d/usteer b/openwrt/usteer/files/etc/init.d/usteer index d73c622..09429cf 100755 --- a/openwrt/usteer/files/etc/init.d/usteer +++ b/openwrt/usteer/files/etc/init.d/usteer @@ -53,6 +53,7 @@ uci_usteer() { uci_option_to_json_bool "$cfg" syslog uci_option_to_json_bool "$cfg" load_kick_enabled + uci_option_to_json_bool "$cfg" assoc_steering uci_option_to_json_string "$cfg" node_up_script for opt in \ diff --git a/policy.c b/policy.c index c528bfa..f083dc3 100644 --- a/policy.c +++ b/policy.c @@ -143,6 +143,9 @@ usteer_check_request(struct sta_info *si, enum usteer_event_type type) if (type == EVENT_TYPE_AUTH) return true; + if (type == EVENT_TYPE_ASSOC && !config.assoc_steering) + return true; + if (si->stats[type].blocked_cur >= config.max_retry_band) { MSG_T_STA("max_retry_band", si->sta->addr, "max retry (%u) exceeded\n", config.max_retry_band); diff --git a/ubus.c b/ubus.c index 2aa82e5..9bd1cc0 100644 --- a/ubus.c +++ b/ubus.c @@ -148,6 +148,7 @@ struct cfg_item { _cfg(U32, load_balancing_threshold), \ _cfg(U32, band_steering_threshold), \ _cfg(U32, remote_update_interval), \ + _cfg(BOOL, assoc_steering), \ _cfg(I32, min_connect_snr), \ _cfg(I32, min_snr), \ _cfg(I32, roam_scan_snr), \ diff --git a/usteer.h b/usteer.h index 0041886..2efc338 100644 --- a/usteer.h +++ b/usteer.h @@ -126,6 +126,8 @@ struct usteer_config { uint32_t max_retry_band; uint32_t seen_policy_timeout; + bool assoc_steering; + uint32_t band_steering_threshold; uint32_t load_balancing_threshold;