summaryrefslogtreecommitdiffstats
path: root/sys/net80211/ieee80211_node.c
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2005-07-31 06:12:32 +0000
committersam <sam@FreeBSD.org>2005-07-31 06:12:32 +0000
commit2cd7f030b785e55a0de9824d17ef2394f337ec68 (patch)
treefa9380c5c10353a67a795c544d62f1a273b23f33 /sys/net80211/ieee80211_node.c
parente369c14b22814d6dc62b255fd4b6c747159585f0 (diff)
downloadFreeBSD-src-2cd7f030b785e55a0de9824d17ef2394f337ec68.zip
FreeBSD-src-2cd7f030b785e55a0de9824d17ef2394f337ec68.tar.gz
close a race between reclaiming a node when a station is inactive
and sending the null data frame used to probe inactive stations MFC after: 5 days
Diffstat (limited to 'sys/net80211/ieee80211_node.c')
-rw-r--r--sys/net80211/ieee80211_node.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c
index 81f6138..72884f0 100644
--- a/sys/net80211/ieee80211_node.c
+++ b/sys/net80211/ieee80211_node.c
@@ -1474,6 +1474,14 @@ IEEE80211_DPRINTF(ic, IEEE80211_MSG_POWER, "[%s] discard frame, age %u\n", ether
IEEE80211_MSG_INACT | IEEE80211_MSG_NODE,
ni, "%s",
"probe station due to inactivity");
+ /*
+ * Grab a reference before unlocking the table
+ * so the node cannot be reclaimed before we
+ * send the frame. ieee80211_send_nulldata
+ * understands we've done this and reclaims the
+ * ref for us as needed.
+ */
+ ieee80211_ref_node(ni);
IEEE80211_NODE_UNLOCK(nt);
ieee80211_send_nulldata(ni);
/* XXX stat? */
OpenPOWER on IntegriCloud