PERFORCE change 66606 for review
Sam Leffler
sam at FreeBSD.org
Mon Dec 6 19:17:46 PST 2004
http://perforce.freebsd.org/chv.cgi?CH=66606
Change 66606 by sam at sam_ebb on 2004/12/07 03:16:53
Go back to holding a reference on a station when we start
authentication rather than when we receive a probe request.
The race condition that motivated the original decision won't
happen 'cuz of the node table changes and populating the
station table based on probe requests is bad in a dense
environment.
Affected files ...
.. //depot/projects/wifi/sys/net80211/ieee80211_input.c#25 edit
Differences ...
==== //depot/projects/wifi/sys/net80211/ieee80211_input.c#25 (text+ko) ====
@@ -873,7 +873,8 @@
ni = ieee80211_dup_bss(ic->ic_sta, wh->i_addr2);
if (ni == NULL)
return;
- }
+ } else
+ (void) ieee80211_ref_node(ni);
ni->ni_inact_reload = ic->ic_inact_auth;
IEEE80211_SEND_MGMT(ic, ni,
IEEE80211_FC0_SUBTYPE_AUTH, seq + 1);
@@ -1023,8 +1024,10 @@
return;
}
allocbs = 1;
- } else
+ } else {
+ (void) ieee80211_ref_node(ni);
allocbs = 0;
+ }
ni->ni_rssi = rssi;
ni->ni_rstamp = rstamp;
if (!alloc_challenge(ic, ni)) {
@@ -2011,12 +2014,14 @@
wh, ieee80211_mgt_subtype_name[subtype >>
IEEE80211_FC0_SUBTYPE_SHIFT],
"%s", "recv'd rate set invalid");
- if (allocbs) /* reclaim immediately */
- ieee80211_free_node(ni);
} else {
IEEE80211_SEND_MGMT(ic, ni,
IEEE80211_FC0_SUBTYPE_PROBE_RESP, 0);
}
+ if (allocbs && ic->ic_opmode != IEEE80211_M_IBSS) {
+ /* reclaim immediately */
+ ieee80211_free_node(ni);
+ }
break;
}
More information about the p4-projects
mailing list