Only update the scan entry state based on newly received frames.

This fixes duplicative BSS entries(memory leaks as well) listed in
"ifconfig dev list scan" when a station fails to associate with an AP.

Reviewed by:	sam
Approved by:	re (scottl)
This commit is contained in:
Tai-hwa Liang 2005-07-06 01:31:34 +00:00
parent ea32e73208
commit 720bd46e9f

View File

@ -1917,7 +1917,8 @@ ieee80211_recv_mgmt(struct ieee80211com *ic, struct mbuf *m0,
return; return;
} }
if (ni == ic->ic_bss) { if (ni == ic->ic_bss &&
!IEEE80211_ADDR_EQ(wh->i_addr2, ni->ni_bssid)) {
#ifdef IEEE80211_DEBUG #ifdef IEEE80211_DEBUG
if (ieee80211_msg_scan(ic)) if (ieee80211_msg_scan(ic))
dump_probe_beacon(subtype, 1, dump_probe_beacon(subtype, 1,