summaryrefslogtreecommitdiffstats
path: root/sys/net80211/ieee80211_output.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_output.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_output.c')
-rw-r--r--sys/net80211/ieee80211_output.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c
index eb558a5..78b62d0 100644
--- a/sys/net80211/ieee80211_output.c
+++ b/sys/net80211/ieee80211_output.c
@@ -199,6 +199,10 @@ ieee80211_mgmt_output(struct ieee80211com *ic, struct ieee80211_node *ni,
/*
* Send a null data frame to the specified node.
+ *
+ * NB: the caller is assumed to have setup a node reference
+ * for use; this is necessary to deal with a race condition
+ * when probing for inactive stations.
*/
int
ieee80211_send_nulldata(struct ieee80211_node *ni)
@@ -212,9 +216,10 @@ ieee80211_send_nulldata(struct ieee80211_node *ni)
if (m == NULL) {
/* XXX debug msg */
ic->ic_stats.is_tx_nobuf++;
+ ieee80211_unref_node(&ni);
return ENOMEM;
}
- m->m_pkthdr.rcvif = (void *) ieee80211_ref_node(ni);
+ m->m_pkthdr.rcvif = (void *) ni;
wh = mtod(m, struct ieee80211_frame *);
ieee80211_send_setup(ic, ni, wh,
OpenPOWER on IntegriCloud