From patchwork Wed Apr 23 21:23:37 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Bizon X-Patchwork-Id: 341999 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from maxx.maxx.shmoo.com (maxx.shmoo.com [205.134.188.171]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id CE0E2140122 for ; Thu, 24 Apr 2014 07:24:02 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 2E3369D329; Wed, 23 Apr 2014 17:24:00 -0400 (EDT) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9xEWzBD3D1qi; Wed, 23 Apr 2014 17:23:59 -0400 (EDT) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id D050E9D32A; Wed, 23 Apr 2014 17:23:53 -0400 (EDT) X-Original-To: mailman-post+hostap@maxx.shmoo.com Delivered-To: mailman-post+hostap@maxx.shmoo.com Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 5DA449D329 for ; Wed, 23 Apr 2014 17:23:53 -0400 (EDT) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id f2btqRp-QEh2 for ; Wed, 23 Apr 2014 17:23:46 -0400 (EDT) Received: from ns.iliad.fr (ns.iliad.fr [212.27.33.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by maxx.maxx.shmoo.com (Postfix) with ESMTPS id 453F19D32A for ; Wed, 23 Apr 2014 17:23:41 -0400 (EDT) Received: from ns.iliad.fr (localhost [127.0.0.1]) by ns.iliad.fr (Postfix) with ESMTP id 287E3205A1; Wed, 23 Apr 2014 23:23:40 +0200 (CEST) Received: from sakura.iliad.local (freebox.vlq16.iliad.fr [213.36.7.13]) by ns.iliad.fr (Postfix) with ESMTP id 1E3D620520; Wed, 23 Apr 2014 23:23:40 +0200 (CEST) From: Maxime Bizon To: hostap@lists.shmoo.com Subject: [PATCH] Interworking: don't filter probe requests when interworking is disabled. Date: Wed, 23 Apr 2014 23:23:37 +0200 Message-Id: <1398288217-3839-1-git-send-email-mbizon@freebox.fr> X-Mailer: git-send-email 1.7.9.5 X-Virus-Scanned: ClamAV using ClamSMTP ; ns.iliad.fr ; Wed Apr 23 23:23:40 2014 +0200 (CEST) X-BeenThere: hostap@lists.shmoo.com X-Mailman-Version: 2.1.11 Precedence: list List-Id: HostAP Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: hostap-bounces@lists.shmoo.com Errors-To: hostap-bounces@lists.shmoo.com 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 --- src/ap/beacon.c | 2 ++ 1 file changed, 2 insertions(+) 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