From d076105619ea5390dba27ce0ea003a7f2aee30b2 Mon Sep 17 00:00:00 2001
From: Maxime Bizon <mbizon@freebox.fr>
Date: Wed, 23 Apr 2014 22:38:42 +0200
Subject: [PATCH 19/19] 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 to match the
behaviour of code without CONFIG_INTERWORKING
---
 src/ap/beacon.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/ap/beacon.c b/src/ap/beacon.c
index c4341f2..b717794 100644
--- a/src/ap/beacon.c
+++ b/src/ap/beacon.c
@@ -603,6 +603,7 @@ void handle_probe_req(struct hostapd_data *hapd,
 	if (elems.interworking && elems.interworking_len >= 1) {
 		u8 ant = elems.interworking[0] & 0x0f;
 		if (ant != INTERWORKING_ANT_WILDCARD &&
+		    hapd->conf->interworking &&
 		    ant != hapd->conf->access_network_type) {
 			wpa_printf(MSG_MSGDUMP, "Probe Request from " MACSTR
 				   " for mismatching ANT %u ignored",
@@ -619,6 +620,7 @@ void handle_probe_req(struct hostapd_data *hapd,
 		else
 			hessid = elems.interworking + 1 + 2;
 		if (!is_broadcast_ether_addr(hessid) &&
+		    hapd->conf->interworking &&
 		    os_memcmp(hessid, hapd->conf->hessid, ETH_ALEN) != 0) {
 			wpa_printf(MSG_MSGDUMP, "Probe Request from " MACSTR
 				   " for mismatching HESSID " MACSTR
-- 
1.7.9.5

