From patchwork Fri May 12 10:29:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikael Kanstrup X-Patchwork-Id: 761544 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wPR7h39Cnz9s7B for ; Fri, 12 May 2017 20:30:24 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="DUBRw0Tc"; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: Date:Message-ID:To:Subject:From:Reply-To:Cc:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=ZZ8RZpKJETgbKa2BvsXfgh/EW7ttJciywQWHtd9wnxw=; b=DUBRw0TcbaRWZ46CT3BqJkI5Oi loYhWrxk4i+N46x4mPkiB48Vhhk1Pt6ERQNTywUYzjh5DQZEZMjwg+sp9nbu5VgqPaIxGL/CsONZY BmlVl/plxtguLJu3IJ2fyOxrrglezZtY+YpnZnh0axQ3Z1ad+GPNNaP4Jme7B82DHzKmRjVPnAUmb BlWilhfkmyvCRwAU7P9TqhGUP3zQlHa5UpUlDs/cSlHiEVbQMGJ281QOxWL45uERoxyINPDGRAMpc 3rZPUPY8SJIG4Xotsa6fRc2nnWJTXuHq5sILAg6HXPq64xKTJWk8v4ISpyuI5+aVt4qmG3rE7yo7R evzlp8xg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1d97q2-0006hy-3l; Fri, 12 May 2017 10:30:22 +0000 Received: from seldsegrel01.sonyericsson.com ([37.139.156.29]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1d97py-0005TZ-6n for hostap@lists.infradead.org; Fri, 12 May 2017 10:30:20 +0000 From: Mikael Kanstrup Subject: (non-FT) Roaming question To: Message-ID: <9a46753b-184b-3e06-0305-310f9980f59c@sony.com> Date: Fri, 12 May 2017 12:29:44 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170512_033018_433210_6B992C05 X-CRM114-Status: GOOD ( 12.94 ) X-Spam-Score: -4.2 (----) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-4.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [37.139.156.29 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Hi, A few questions about non-FT roaming. Basically the case moving between two bsses with identical configuration on same local network. Is the association towards first AP lost as soon as roaming towards the other AP is initiated? I ask to better understand the following scenario: 1. STA connects to first AP (AP1) 2. STA initiates roam to second AP (AP2) 3. AP2 fails to respond with Association Response 4. STA times out waiting for Association Response 5. STA disconnects from AP1 6. STA decides to reconnect, finds AP1 and reconnects Why is STA disconnected from AP1 at step 5 above? Can't the old association with AP1 be kept to allow a non-interrupted connection towards the network if roam fails? We see this happing on crowded networks where the number of retransmitted management frames at times are huge. Logs from a simulated environment available. Supplicant debug log with the scenario: https://drive.google.com/open?id=0Bzur-VMGp9u5RkcyeFdxOWt4R3c The logs are from a setup like this: - Two hostapds (latest version from git) running with D-Link DWA-160 adapters (driver rx28xx) - wpa_supplicant (latest version from git) running with Raspberry PI Wi-Fi dongle (driver brcmfmac) - hostapd has been patched with attached patch to allow blocking assoc response frames. /Mikael From 2436296d96e656aafe8561134e5d14db879f7d04 Mon Sep 17 00:00:00 2001 From: Mikael Kanstrup Date: Wed, 25 Jan 2017 10:57:25 +0100 Subject: [PATCH] hostapd: Add skip_auth_reply and skip_assoc_reply test commands Add skip_auth_reply and skip_assoc_reply commands for testing purpuses. By enabling skip with the new command either authentication reply and/or association reply frames are skipped from being sent by AP. These commands can be used to simulate dropped reply frames. Signed-off-by: Mikael Kanstrup --- hostapd/ctrl_iface.c | 4 ++++ src/ap/hostapd.h | 2 ++ src/ap/ieee802_11.c | 17 +++++++++++++++++ 3 files changed, 23 insertions(+) diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c index 9bfead0..34a1768 100644 --- a/hostapd/ctrl_iface.c +++ b/hostapd/ctrl_iface.c @@ -1278,6 +1278,10 @@ static int hostapd_ctrl_iface_set(struct hostapd_data *hapd, char *cmd) hapd->ext_mgmt_frame_handling = atoi(value); } else if (os_strcasecmp(cmd, "ext_eapol_frame_io") == 0) { hapd->ext_eapol_frame_io = atoi(value); + } else if (os_strcasecmp(cmd, "skip_auth_reply") == 0) { + hapd->skip_auth_reply = !!atoi(value); + } else if (os_strcasecmp(cmd, "skip_assoc_reply") == 0) { + hapd->skip_assoc_reply = !!atoi(value); #endif /* CONFIG_TESTING_OPTIONS */ #ifdef CONFIG_MBO } else if (os_strcasecmp(cmd, "mbo_assoc_disallow") == 0) { diff --git a/src/ap/hostapd.h b/src/ap/hostapd.h index e7c65f7..96ccbb1 100644 --- a/src/ap/hostapd.h +++ b/src/ap/hostapd.h @@ -302,6 +302,8 @@ struct hostapd_data { #ifdef CONFIG_TESTING_OPTIONS unsigned int ext_mgmt_frame_handling:1; unsigned int ext_eapol_frame_io:1; + unsigned int skip_auth_reply:1; + unsigned int skip_assoc_reply:1; struct l2_packet_data *l2_test; #endif /* CONFIG_TESTING_OPTIONS */ diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c index d15a70c..5532d81 100644 --- a/src/ap/ieee802_11.c +++ b/src/ap/ieee802_11.c @@ -280,6 +280,14 @@ static int send_auth_reply(struct hostapd_data *hapd, size_t rlen; int reply_res = WLAN_STATUS_UNSPECIFIED_FAILURE; +#ifdef CONFIG_TESTING_OPTIONS + if (hapd->skip_auth_reply) { + wpa_printf(MSG_INFO, "skip_auth_reply active: STA=" MACSTR, + MAC2STR(dst)); + return WLAN_STATUS_SUCCESS; + } +#endif /* CONFIG_TESTING_OPTIONS */ + rlen = IEEE80211_HDRLEN + sizeof(reply->u.auth) + ies_len; buf = os_zalloc(rlen); if (buf == NULL) @@ -2740,6 +2748,15 @@ static u16 send_assoc_resp(struct hostapd_data *hapd, struct sta_info *sta, } #endif /* CONFIG_FILS */ +#ifdef CONFIG_TESTING_OPTIONS + if (hapd->skip_assoc_reply) { + wpa_printf(MSG_INFO, "skip_assoc_reply active: STA=" MACSTR, + MAC2STR(sta->addr)); + return WLAN_STATUS_SUCCESS; + } +#endif /* CONFIG_TESTING_OPTIONS */ + + #ifdef CONFIG_OWE if ((hapd->conf->wpa_key_mgmt & WPA_KEY_MGMT_OWE) && sta && sta->owe_ecdh && -- 2.10.1.502.g6598894