summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2018-04-28 14:49:08 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2018-04-28 14:49:08 +0000
commit4f16860a0f12c87749c2085c6c759ed94e80e071 (patch)
treed88f54a9b99231eaee52d60b58ea5776aa98514f /sys/dev/ic
parent3646cbe53e06f4d6b90cafda55577c5459fadcfe (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/ic')
-rw-r--r--sys/dev/ic/pgt.c6
1 files changed, 3 insertions, 3 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. */