From patchwork Fri Aug 10 22:45:40 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Lamparter X-Patchwork-Id: 176646 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]) by ozlabs.org (Postfix) with ESMTP id 248D52C00A3 for ; Sat, 11 Aug 2012 08:45:58 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 4F9219D28F; Fri, 10 Aug 2012 18:45:56 -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 JjXh8IHMeuTx; Fri, 10 Aug 2012 18:45:56 -0400 (EDT) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 318339D295; Fri, 10 Aug 2012 18:45:51 -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 01AD59D295 for ; Fri, 10 Aug 2012 18:45:50 -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 YsohjkvvR5+b for ; Fri, 10 Aug 2012 18:45:46 -0400 (EDT) Received: from mail-wg0-f48.google.com (mail-wg0-f48.google.com [74.125.82.48]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (not verified)) by maxx.maxx.shmoo.com (Postfix) with ESMTPS id 20CED9D28F for ; Fri, 10 Aug 2012 18:45:45 -0400 (EDT) Received: by wgbdq11 with SMTP id dq11so1243091wgb.5 for ; Fri, 10 Aug 2012 15:45:44 -0700 (PDT) Received: by 10.180.106.137 with SMTP id gu9mr9313444wib.20.1344638744778; Fri, 10 Aug 2012 15:45:44 -0700 (PDT) Received: from debian64.localnet (pD9F8B0B7.dip.t-dialin.net. [217.248.176.183]) by mx.google.com with ESMTPS id w7sm570590wiz.0.2012.08.10.15.45.42 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 10 Aug 2012 15:45:43 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=debian64.localnet ident=chuck) by debian64.localnet with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1Szxxd-00086d-47; Sat, 11 Aug 2012 00:45:41 +0200 Subject: [PATCH v2] AP: fix erroneous "station tried TKIP" error To: hostap@lists.shmoo.com From: Christian Lamparter Date: Sat, 11 Aug 2012 00:45:40 +0200 MIME-Version: 1.0 Message-Id: <201208110045.40554.chunkeey@googlemail.com> Cc: j@w1.fi X-BeenThere: hostap@lists.shmoo.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: HostAP Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: hostap-bounces@lists.shmoo.com Errors-To: hostap-bounces@lists.shmoo.com The commit b5fd8b18335f2a7784a1f0a5eb5dbe45976d9e21 "VHT: Do not allow use of TKIP with VHT" introduced an off-by-one regression: a WPA/RSN 11n ap would no longer accept stations to connect, instead it would produce a bogus error message: ... Station tried to use TKIP with HT association. Cc: Mahesh Palivela Signed-hostapd: Christian Lamparter --- This time, I got the right commit-id (the one which broke the code) and just for good measure: a reworded commit message. Regards, Chr --- src/ap/ieee802_11.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c index dedf72a..537b555 100644 --- a/src/ap/ieee802_11.c +++ b/src/ap/ieee802_11.c @@ -785,7 +785,7 @@ static u16 check_assoc_ies(struct hostapd_data *hapd, struct sta_info *sta, #endif /* CONFIG_IEEE80211R */ #ifdef CONFIG_IEEE80211N - if ((sta->flags & (WLAN_STA_HT | WLAN_STA_VHT)) || + if ((sta->flags & (WLAN_STA_HT | WLAN_STA_VHT)) && wpa_auth_get_pairwise(sta->wpa_sm) == WPA_CIPHER_TKIP) { hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211,