[PATCH 1/2] hostap: drop probe request if number of stations limit is reached
Felix Fietkau
nbd
Sat Feb 23 06:47:16 PST 2013
If multiple APs serve the same SSID, and one of them is full, it should
not respond to probe requests anymore, as it won't allow clients to
connect anyway.
Signed-hostap: Felix Fietkau <nbd at openwrt.org>
---
src/ap/beacon.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/ap/beacon.c b/src/ap/beacon.c
index 4c47c75..3e0775e 100644
--- a/src/ap/beacon.c
+++ b/src/ap/beacon.c
@@ -455,6 +455,12 @@ void handle_probe_req(struct hostapd_data *hapd,
return;
}
+ if (!sta && hapd->num_sta >= hapd->conf->max_num_sta) {
+ wpa_printf(MSG_MSGDUMP, "Probe Request from " MACSTR " ignored,"
+ " too many connected stations.", MAC2STR(mgmt->sa));
+ return;
+ }
+
#ifdef CONFIG_INTERWORKING
if (elems.interworking && elems.interworking_len >= 1) {
u8 ant = elems.interworking[0] & 0x0f;
--
1.8.0.2
More information about the Hostap
mailing list