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
1 changed files with 3 additions and 2 deletions

View File

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