diff options
author | Stefan Sperling <stsp@cvs.openbsd.org> | 2018-04-28 14:49:08 +0000 |
---|---|---|
committer | Stefan Sperling <stsp@cvs.openbsd.org> | 2018-04-28 14:49:08 +0000 |
commit | 4f16860a0f12c87749c2085c6c759ed94e80e071 (patch) | |
tree | d88f54a9b99231eaee52d60b58ea5776aa98514f /sys/dev | |
parent | 3646cbe53e06f4d6b90cafda55577c5459fadcfe (diff) |
When starting a background scan, free the nodes table to ensure we
get an up-to-date view of APs around us. In particular, we need to
kick out the AP we are associated to. Otherwise, our current AP might
stay cached if it is turned off while we are scanning, and we could
end up picking a now non-existent but "good looking" AP over and over.
found with and ok phessler@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ic/pgt.c | 6 | ||||
-rw-r--r-- | sys/dev/usb/if_atu.c | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/ic/pgt.c b/sys/dev/ic/pgt.c index 8ff77a99ccb..0fbe8f8f129 100644 --- a/sys/dev/ic/pgt.c +++ b/sys/dev/ic/pgt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pgt.c,v 1.91 2018/04/28 11:17:08 pirofti Exp $ */ +/* $OpenBSD: pgt.c,v 1.92 2018/04/28 14:49:07 stsp Exp $ */ /* * Copyright (c) 2006 Claudio Jeker <claudio@openbsd.org> @@ -2936,7 +2936,7 @@ pgt_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int arg) ic->ic_if.if_timer = 0; ic->ic_mgt_timer = 0; ic->ic_flags &= ~IEEE80211_F_SIBSS; - ieee80211_free_allnodes(ic); + ieee80211_free_allnodes(ic, 1); break; case IEEE80211_S_SCAN: ic->ic_if.if_timer = 1; @@ -2944,7 +2944,7 @@ pgt_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int arg) if (sc->sc_flags & SC_NOFREE_ALLNODES) sc->sc_flags &= ~SC_NOFREE_ALLNODES; else - ieee80211_free_allnodes(ic); + ieee80211_free_allnodes(ic, 1); #ifndef IEEE80211_STA_ONLY /* Just use any old channel; we override it anyway. */ diff --git a/sys/dev/usb/if_atu.c b/sys/dev/usb/if_atu.c index ede699045be..ae65dd61891 100644 --- a/sys/dev/usb/if_atu.c +++ b/sys/dev/usb/if_atu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_atu.c,v 1.124 2018/01/31 12:36:13 stsp Exp $ */ +/* $OpenBSD: if_atu.c,v 1.125 2018/04/28 14:49:07 stsp Exp $ */ /* * Copyright (c) 2003, 2004 * Daan Vreeken <Danovitsch@Vitsch.net>. All rights reserved. @@ -1210,7 +1210,7 @@ atu_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int arg) case IEEE80211_S_SCAN: memcpy(ic->ic_chan_scan, ic->ic_chan_active, sizeof(ic->ic_chan_active)); - ieee80211_free_allnodes(ic); + ieee80211_free_allnodes(ic, 1); /* tell the event thread that we want a scan */ sc->sc_cmd = ATU_C_SCAN; |