[v2] AP: fix erroneous "station tried TKIP" error

Submitted by Christian Lamparter on Aug. 10, 2012, 10:45 p.m.

Details

Message ID 201208110045.40554.chunkeey@googlemail.com
State Accepted
Commit f0c7a986bbf41b0bfe5b6de2e74c9248c7b807b2
Headers show

Commit Message

Christian Lamparter Aug. 10, 2012, 10:45 p.m.
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 <maheshp@posedge.com>
Signed-hostapd: Christian Lamparter <chunkeey@googlemail.com>
---
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(-)

Comments

Jouni Malinen Aug. 11, 2012, 7:57 a.m.
On Sat, Aug 11, 2012 at 12:45:40AM +0200, Christian Lamparter wrote:
> 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.

Thanks, applied. That was actually from my cleanup and not the original
patch, but anyway, the purpose was not to disable all use of TKIP, HT,
and VHT in any combination.. ;-)

Patch hide | download patch | download mbox

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,