From patchwork Sat Sep 24 21:08:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: michael-dev X-Patchwork-Id: 674377 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3shNPV1CkQz9s9N for ; Sun, 25 Sep 2016 07:18:22 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=fami-braun.de header.i=@fami-braun.de header.b=lChQoNCf; dkim-atps=neutral Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bnuKk-0005qu-U9; Sat, 24 Sep 2016 21:18:06 +0000 Received: from casper.infradead.org ([2001:770:15f::2]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bnuBh-0000RM-9Y for hostap@bombadil.infradead.org; Sat, 24 Sep 2016 21:08:45 +0000 Received: from mo6-p00-ob.smtp.rzone.de ([2a01:238:20a:202:5300::1]) by casper.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bnuBe-0003k2-LY for hostap@lists.infradead.org; Sat, 24 Sep 2016 21:08:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1474751301; l=1089; s=domk; d=fami-braun.de; h=References:In-Reply-To:Date:Subject:To:From; bh=mNgCF8Y5FFmBmTZqpbC63uLNdNRlvbQQ97D+u2WR/0I=; b=lChQoNCfpQfei+KjpBYStQjW3YySohxJ9S/FuZAsKIE+NWkI7Lo6K2CX9BKuikkaF3a hdL5ZDjBtv0Pit/6YPLslISVFpOOSFvT6FZKZIEnEVFPsWn+IX7YvmYcj0BDu0Mq/gaOI ZRXQ7SoWyTw/C5R9Q/lOkOLIALHRw4Bzzzg= X-RZG-AUTH: :P20JeEWkefDI1ODZs1HHtgV3eF0OpFsRaGIBBWYxhJvJPtnXtogBWnvAo0oQxSWlqltpLmpO4A== X-RZG-CLASS-ID: mo00 Received: from dynamic.fami-braun.de (p4FE4FBE6.dip0.t-ipconnect.de [79.228.251.230]) by smtp.strato.de (RZmta 39.3 DYNA|AUTH) with ESMTPSA id j0abd8s8OL8LFZj (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate) for ; Sat, 24 Sep 2016 23:08:21 +0200 (CEST) Received: from dynamic.fami-braun.de (localhost [127.0.0.1]) by dynamic.fami-braun.de (fami-braun.de) with ESMTP id C74821543D5 for ; Sat, 24 Sep 2016 23:08:20 +0200 (CEST) Received: by dynamic.fami-braun.de (fami-braun.de, from userid 1001) id B21A7158298; Sat, 24 Sep 2016 23:08:20 +0200 (CEST) From: "M. Braun" To: hostap@lists.infradead.org Subject: [PATCH v2 29/33] FT: handle OVER_DS reassociate client retry Date: Sat, 24 Sep 2016 23:08:13 +0200 Message-Id: <1474751297-7277-30-git-send-email-michael-dev@fami-braun.de> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1474751297-7277-1-git-send-email-michael-dev@fami-braun.de> References: <1474751297-7277-1-git-send-email-michael-dev@fami-braun.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160924_220842_767056_243FB179 X-CRM114-Status: GOOD ( 10.01 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.1 on casper.infradead.org summary: Content analysis details: (-2.7 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a01:238:20a:202:5300:0:0:1 listed in] [list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Michael Braun Signed-off-by: Michael Braun --- src/ap/ieee802_11.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c index 1c871e3..b5b24e2 100644 --- a/src/ap/ieee802_11.c +++ b/src/ap/ieee802_11.c @@ -2167,6 +2167,19 @@ static void handle_assoc(struct hostapd_data *hapd, */ sta->flags |= WLAN_STA_AUTH; } else + if (sta && sta->auth_alg == WLAN_AUTH_FT && + (sta->flags & WLAN_STA_AUTH) == 0 && + (sta->flags & WLAN_STA_PREAUTH_FT_OVER_DS) == 0 && + (sta->flags & WLAN_STA_ASSOC)) { + hostapd_logger(hapd, mgmt->sa, HOSTAPD_MODULE_IEEE80211, + HOSTAPD_LEVEL_DEBUG, + "FT: Already associated STA " MACSTR " try to " + "connect without authenticated and with OVER_DS " + "cleared but using FT. Ignore as it might be a " + "retry.", + MAC2STR(mgmt->sa)); + return; + } else #endif /* CONFIG_IEEE80211R */ if (sta == NULL || (sta->flags & WLAN_STA_AUTH) == 0) { hostapd_logger(hapd, mgmt->sa, HOSTAPD_MODULE_IEEE80211,