summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstsp <stsp@openbsd.org>2016-02-09 13:48:31 +0000
committerstsp <stsp@openbsd.org>2016-02-09 13:48:31 +0000
commitc4f9a6110f720398e7e44d7d18f8a5365a8363fd (patch)
tree3c094db48867db2f0b5631a626fb5501f5b0a3b9
parent- Remove parameter fd from snscore() since it's never used (diff)
downloadwireguard-openbsd-c4f9a6110f720398e7e44d7d18f8a5365a8363fd.tar.xz
wireguard-openbsd-c4f9a6110f720398e7e44d7d18f8a5365a8363fd.zip
Log frames which fall outside the BlockAack window in dmesg if the
interface debug flag is set (enabled with: ifconfig iwn0 debug). Shows the frame's sequence number and the current BA window. I'm adding this for diagnosis, just in case it will be needed to make future decisions about tuning the heuristic which works around network stalls caused by such frames.
-rw-r--r--sys/net80211/ieee80211_input.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c
index e46c5135fef..5dc48198686 100644
--- a/sys/net80211/ieee80211_input.c
+++ b/sys/net80211/ieee80211_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ieee80211_input.c,v 1.161 2016/02/08 01:00:47 stsp Exp $ */
+/* $OpenBSD: ieee80211_input.c,v 1.162 2016/02/09 13:48:31 stsp Exp $ */
/*-
* Copyright (c) 2001 Atsushi Onoe
@@ -728,6 +728,13 @@ ieee80211_input_ba(struct ieee80211com *ic, struct mbuf *m,
* APs, which emit "sequence" numbers such as 1888, 1889, 2501,
* 1890, 1891, ... all for the same TID.
*/
+#ifdef DIAGNOSTIC
+ if ((ifp->if_flags & IFF_DEBUG) &&
+ ((sn - ba->ba_winend) & 0xfff) > 1)
+ printf("%s: received frame with bad sequence number "
+ "%d, expecting %d:%d\n", __func__,
+ sn, ba->ba_winstart, ba->ba_winend);
+#endif
if (((sn - ba->ba_winend) & 0xfff) > IEEE80211_BA_MAX_WINSZ) {
if (ba->ba_winmiss < IEEE80211_BA_MAX_WINMISS) {
if (ba->ba_missedsn == sn - 1)