diff options
author | Patrick Wildt <patrick@cvs.openbsd.org> | 2018-11-20 10:00:16 +0000 |
---|---|---|
committer | Patrick Wildt <patrick@cvs.openbsd.org> | 2018-11-20 10:00:16 +0000 |
commit | 2f295a0db2d17a518c16209ac59aa634c450491d (patch) | |
tree | 8d5274fbec7cc1176357a3594aa186c939b5445a | |
parent | 0dfae8efb066be182b6b21318274ba22583e34c7 (diff) |
The first packet received from each AP in each QoS class would be
dropped as the sequence number matches the initial value of the
cached last sequence number (zero). On some APs (notably Android
WIFI hotspots) this hits the first packet of the WPA2 4-way
handshake. This causes connection delays and in some cases
connection to the AP fails completely. Initialize the cached last
sequence numbers for received packets to an invalid value instead.
From Christian Ehrhardt
ok gerhard@ stsp@
-rw-r--r-- | sys/net80211/ieee80211_node.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c index 30d94c20d0a..176f20d15c8 100644 --- a/sys/net80211/ieee80211_node.c +++ b/sys/net80211/ieee80211_node.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_node.c,v 1.155 2018/10/27 10:02:47 phessler Exp $ */ +/* $OpenBSD: ieee80211_node.c,v 1.156 2018/11/20 10:00:15 patrick Exp $ */ /* $NetBSD: ieee80211_node.c,v 1.14 2004/05/09 09:18:47 dyoung Exp $ */ /*- @@ -1548,13 +1548,17 @@ void ieee80211_setup_node(struct ieee80211com *ic, struct ieee80211_node *ni, const u_int8_t *macaddr) { - int s; + int i, s; DPRINTF(("%s\n", ether_sprintf((u_int8_t *)macaddr))); IEEE80211_ADDR_COPY(ni->ni_macaddr, macaddr); ieee80211_node_newstate(ni, IEEE80211_STA_CACHE); ni->ni_ic = ic; /* back-pointer */ + /* Initialize cached last sequence numbers with invalid values. */ + ni->ni_rxseq = 0xffffU; + for (i=0; i < IEEE80211_NUM_TID; ++i) + ni->ni_qos_rxseqs[i] = 0xffffU; #ifndef IEEE80211_STA_ONLY mq_init(&ni->ni_savedq, IEEE80211_PS_MAX_QUEUE, IPL_NET); timeout_set(&ni->ni_eapol_to, ieee80211_eapol_timeout, ni); |