From 2aa82e52da09211f6917be0fb268d12e99334e53 Mon Sep 17 00:00:00 2001 From: Maxime Bizon Date: Wed, 23 Apr 2014 23:23:37 +0200 Subject: [PATCH] Interworking: Don't filter probe requests when interworking is disabled With hidden SSID (ignore_broadcast_ssid), an IOS device trying to connect to the AP will send a probe request with ANT == 2. If interworking support is just compiled (not enabled), we will drop the probe request since default ANT is 0. Check that interworking is enabled before filtering based on ANT or HESSID to match the behavior of code without CONFIG_INTERWORKING. Signed-off-by: Maxime Bizon --- src/ap/beacon.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ap/beacon.c b/src/ap/beacon.c index e06ce77..56df318 100644 --- a/src/ap/beacon.c +++ b/src/ap/beacon.c @@ -600,7 +600,8 @@ void handle_probe_req(struct hostapd_data *hapd, } #ifdef CONFIG_INTERWORKING - if (elems.interworking && elems.interworking_len >= 1) { + if (hapd->conf->interworking && + elems.interworking && elems.interworking_len >= 1) { u8 ant = elems.interworking[0] & 0x0f; if (ant != INTERWORKING_ANT_WILDCARD && ant != hapd->conf->access_network_type) { @@ -611,7 +612,7 @@ void handle_probe_req(struct hostapd_data *hapd, } } - if (elems.interworking && + if (hapd->conf->interworking && elems.interworking && (elems.interworking_len == 7 || elems.interworking_len == 9)) { const u8 *hessid; if (elems.interworking_len == 7) -- 2.1.4