summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hessler <phessler@cvs.openbsd.org>2020-01-13 09:57:26 +0000
committerPeter Hessler <phessler@cvs.openbsd.org>2020-01-13 09:57:26 +0000
commitef7a18a9164199d9f670fc7ea73fa6a87a6e7d7a (patch)
treea65af4400e232e802fc40822e3e5953f7004f058
parent9e18cab545e7eb872d81fe6ec471494ec509f9fb (diff)
When we change attributes for a join essid, we should apply the change
immediately instead of waiting to (randomly) switch away and switch back. Found by martijn@ OK stsp@
-rw-r--r--sys/net80211/ieee80211_ioctl.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/net80211/ieee80211_ioctl.c b/sys/net80211/ieee80211_ioctl.c
index 9ddffff665a..1dc3dc7122b 100644
--- a/sys/net80211/ieee80211_ioctl.c
+++ b/sys/net80211/ieee80211_ioctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ieee80211_ioctl.c,v 1.77 2019/11/11 18:07:21 stsp Exp $ */
+/* $OpenBSD: ieee80211_ioctl.c,v 1.78 2020/01/13 09:57:25 phessler Exp $ */
/* $NetBSD: ieee80211_ioctl.c,v 1.15 2004/05/06 02:58:16 dyoung Exp $ */
/*-
@@ -540,6 +540,12 @@ ieee80211_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
error = ENETRESET;
}
} else {
+ if (ic->ic_des_esslen == join.i_len &&
+ memcmp(join.i_nwid, ic->ic_des_essid,
+ join.i_len) == 0) {
+ ieee80211_deselect_ess(ic);
+ error = ENETRESET;
+ }
/* save nwid for auto-join */
if (ieee80211_add_ess(ic, &join) == 0)
ic->ic_flags |= IEEE80211_F_AUTO_JOIN;