diff mbox

Interworking: don't filter probe requests when interworking is disabled.

Message ID 1398288217-3839-1-git-send-email-mbizon@freebox.fr
State Accepted
Headers show

Commit Message

Maxime Bizon April 23, 2014, 9:23 p.m. UTC
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

Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
---
 src/ap/beacon.c |    2 ++
 1 file changed, 2 insertions(+)

Comments

Jouni Malinen April 24, 2014, 9:48 a.m. UTC | #1
On Wed, Apr 23, 2014 at 11:23:37PM +0200, Maxime Bizon wrote:
> 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

Thanks, applied. Though, I moved the hapd->conf->interworking check up
by one level of if statements to remove the unnecessary parsing
operations that would not be used for anything if Interworking was
disabled.
diff mbox

Patch

diff --git a/src/ap/beacon.c b/src/ap/beacon.c
index e06ce77..16685c7 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