diff options
author | Stefan Sperling <stsp@cvs.openbsd.org> | 2012-01-18 14:35:35 +0000 |
---|---|---|
committer | Stefan Sperling <stsp@cvs.openbsd.org> | 2012-01-18 14:35:35 +0000 |
commit | 243dcd714d9afc87d2a7c269308d8d6066f69e5d (patch) | |
tree | ccf6362d7e9c50f91a362a899580139c61992a50 | |
parent | 65492c94f0b4a4ef230c79d753844d967d093c16 (diff) |
Make it possible to free cached nodes which never associated (e.g. nodes
only scanning for networks). These were never put into COLLECT state and
were thus never evicted from the node cache in hostap mode.
ok jsg@
-rw-r--r-- | sys/net80211/ieee80211_node.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c index 893de460bfd..9435a287862 100644 --- a/sys/net80211/ieee80211_node.c +++ b/sys/net80211/ieee80211_node.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_node.c,v 1.63 2011/03/28 14:49:40 kettenis Exp $ */ +/* $OpenBSD: ieee80211_node.c,v 1.64 2012/01/18 14:35:34 stsp Exp $ */ /* $NetBSD: ieee80211_node.c,v 1.14 2004/05/09 09:18:47 dyoung Exp $ */ /*- @@ -1507,8 +1507,10 @@ ieee80211_node_leave(struct ieee80211com *ic, struct ieee80211_node *ni) * If node wasn't previously associated all we need to do is * reclaim the reference. */ - if (ni->ni_associd == 0) + if (ni->ni_associd == 0) { + ieee80211_node_newstate(ni, IEEE80211_STA_COLLECT); return; + } if (ni->ni_pwrsave == IEEE80211_PS_DOZE) ic->ic_pssta--; |