diff options
author | sam <sam@FreeBSD.org> | 2005-01-20 02:59:21 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2005-01-20 02:59:21 +0000 |
commit | 8ec9f729de0c6dccd6d0d425e28a599c1dfb824f (patch) | |
tree | f12b88b3a20644149fbafb5fee0caa772e5dd3ef /sys | |
parent | 3973fcd76891a4c8f0ab3f3e3689073cef7e0d7c (diff) | |
download | FreeBSD-src-8ec9f729de0c6dccd6d0d425e28a599c1dfb824f.zip FreeBSD-src-8ec9f729de0c6dccd6d0d425e28a599c1dfb824f.tar.gz |
when a station is timed out for inactivity, remove it from the table
so it isn't considered again
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net80211/ieee80211_node.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c index 5b6f4ad..f7f55dd 100644 --- a/sys/net80211/ieee80211_node.c +++ b/sys/net80211/ieee80211_node.c @@ -1713,6 +1713,7 @@ ieee80211_node_leave_11g(struct ieee80211com *ic, struct ieee80211_node *ni) void ieee80211_node_leave(struct ieee80211com *ic, struct ieee80211_node *ni) { + struct ieee80211_node_table *nt = ni->ni_table; IEEE80211_DPRINTF(ic, IEEE80211_MSG_ASSOC | IEEE80211_MSG_DEBUG, "[%s] station with aid %d leaves\n", @@ -1752,8 +1753,18 @@ ieee80211_node_leave(struct ieee80211com *ic, struct ieee80211_node *ni) */ ieee80211_sta_leave(ic, ni); done: - ni->ni_inact_reload = ic->ic_inact_init; /* just in case */ - ieee80211_free_node(ni); + /* + * Remove the node from any table it's recorded in and + * drop the caller's reference. Removal from the table + * is important to insure the node is not reprocessed + * for inactivity. + */ + if (nt != NULL) { + IEEE80211_NODE_LOCK(nt); + node_reclaim(nt, ni); + IEEE80211_NODE_UNLOCK(nt); + } else + ieee80211_free_node(ni); } u_int8_t |