Date: Tue, 7 Dec 2004 03:17:44 GMT From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 66606 for review Message-ID: <200412070317.iB73Hilr033055@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=66606 Change 66606 by sam@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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200412070317.iB73Hilr033055>