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 <mbizon@freebox.fr>
This commit is contained in:
Maxime Bizon 2014-04-23 23:23:37 +02:00 committed by Jouni Malinen
parent 13f6a07efc
commit 2aa82e52da

View file

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