From: Maxime Bizon Date: Wed, 23 Apr 2014 21:23:37 +0000 (+0200) Subject: Interworking: Don't filter probe requests when interworking is disabled X-Git-Tag: hostap_2_2~246 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2aa82e52da09211f6917be0fb268d12e99334e53;p=thirdparty%2Fhostap.git 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 --- diff --git a/src/ap/beacon.c b/src/ap/beacon.c index e06ce778d..56df3182e 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)