Date: Tue, 10 Feb 2009 23:51:19 +0000 (UTC) From: Sam Leffler <sam@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r188466 - head/sys/net80211 Message-ID: <200902102351.n1ANpJeK007950@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: sam Date: Tue Feb 10 23:51:18 2009 New Revision: 188466 URL: http://svn.freebsd.org/changeset/base/188466 Log: clean neighbor entries on beacon miss Modified: head/sys/net80211/ieee80211_adhoc.c Modified: head/sys/net80211/ieee80211_adhoc.c ============================================================================== --- head/sys/net80211/ieee80211_adhoc.c Tue Feb 10 23:48:29 2009 (r188465) +++ head/sys/net80211/ieee80211_adhoc.c Tue Feb 10 23:51:18 2009 (r188466) @@ -110,6 +110,15 @@ adhoc_vattach(struct ieee80211vap *vap) #endif } +static void +sta_leave(void *arg, struct ieee80211_node *ni) +{ + struct ieee80211vap *vap = arg; + + if (ni->ni_vap == vap && ni != vap->iv_bss) + ieee80211_node_leave(ni); +} + /* * IEEE80211_M_IBSS+IEEE80211_M_AHDEMO vap state machine handler. */ @@ -146,8 +155,11 @@ adhoc_newstate(struct ieee80211vap *vap, break; case IEEE80211_S_SCAN: switch (ostate) { - case IEEE80211_S_INIT: case IEEE80211_S_RUN: /* beacon miss */ + /* purge station table; entries are stale */ + ieee80211_iterate_nodes(&ic->ic_sta, sta_leave, vap); + /* fall thru... */ + case IEEE80211_S_INIT: if (vap->iv_des_chan != IEEE80211_CHAN_ANYC && !IEEE80211_IS_CHAN_RADAR(vap->iv_des_chan)) { /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902102351.n1ANpJeK007950>