Only increment is_beacon_bad if we're not scanning.

Otherwise things such as off-channel probe responses and beacons are also
silently discarded and logged against this error counter.
This commit is contained in:
adrian 2012-02-28 21:43:29 +00:00
parent c12af6cbb1
commit 176868cc04

View File

@ -1306,7 +1306,8 @@ sta_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m0,
} }
/* XXX probe response in sta mode when !scanning? */ /* XXX probe response in sta mode when !scanning? */
if (ieee80211_parse_beacon(ni, m0, &scan) != 0) { if (ieee80211_parse_beacon(ni, m0, &scan) != 0) {
vap->iv_stats.is_beacon_bad++; if (! (ic->ic_flags & IEEE80211_F_SCAN))
vap->iv_stats.is_beacon_bad++;
return; return;
} }
/* /*