Move the node reference up that pins the WDS peer

node in the node table.  The node reference was
being taken in any path where the wds node was found
and not just when the wds node was first added.

This would have caused wds nodes to get inflated
reference counts, and be leaked on bss reset when
nodes were flushed from the node tables.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3300 0192ed92-7a03-0410-a25b-9323aeb14dbd
This commit is contained in:
mtaylor 2008-01-29 07:00:09 +00:00
parent dead14502d
commit 602be360fc

View File

@ -1525,12 +1525,14 @@ __ieee80211_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int
wds_ni = ieee80211_alloc_node_table( wds_ni = ieee80211_alloc_node_table(
vap, vap,
vap->wds_mac); vap->wds_mac);
if (wds_ni != NULL) if (wds_ni != NULL) {
ieee80211_add_wds_addr( ieee80211_add_wds_addr(
&ic->ic_sta, &ic->ic_sta,
wds_ni, wds_ni,
vap->wds_mac, vap->wds_mac,
1); 1);
ieee80211_ref_node(wds_ni); /* pin in memory */
}
else else
IEEE80211_DPRINTF( IEEE80211_DPRINTF(
vap, vap,
@ -1545,7 +1547,6 @@ __ieee80211_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int
} }
if (wds_ni != NULL) { if (wds_ni != NULL) {
ieee80211_ref_node(wds_ni); /* pin in memory */
ieee80211_node_authorize(wds_ni); ieee80211_node_authorize(wds_ni);
wds_ni->ni_chan = wds_ni->ni_chan =
vap->iv_bss->ni_chan; vap->iv_bss->ni_chan;