diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2016-05-02 09:35:50 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2016-05-02 09:35:50 +0000 |
commit | 3b038697d85d18ab3c8df3253a5a1dea2f54d985 (patch) | |
tree | 810c93cb2297ef987568b2eae0eb4ade39e4b7ed /sys/net80211/ieee80211_input.c | |
parent | 66b03c3715059ea40b0a5d1e1724c0d1a917cc3e (diff) |
Fix a corner case of 12-bit arithmetic: also increment the ba_winmiss
counter if sn == 0 and ba_missedsn == 0xfff.
ok stsp@
Diffstat (limited to 'sys/net80211/ieee80211_input.c')
-rw-r--r-- | sys/net80211/ieee80211_input.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c index 8c602488122..32bfac7e84a 100644 --- a/sys/net80211/ieee80211_input.c +++ b/sys/net80211/ieee80211_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_input.c,v 1.175 2016/05/02 08:12:42 stsp Exp $ */ +/* $OpenBSD: ieee80211_input.c,v 1.176 2016/05/02 09:35:49 tb Exp $ */ /*- * Copyright (c) 2001 Atsushi Onoe @@ -722,7 +722,7 @@ ieee80211_input_ba(struct ieee80211com *ic, struct mbuf *m, * and let the window move forward if neccessary. */ if (ba->ba_winmiss < IEEE80211_BA_MAX_WINMISS) { - if (ba->ba_missedsn == sn - 1) + if (ba->ba_missedsn == ((sn - 1) & 0xfff)) ba->ba_winmiss++; else ba->ba_winmiss = 0; |