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?
Index: net80211/ieee80211_ioctl.c
===================================================================
RCS file: /home/cvs/openbsd/src/sys/net80211/ieee80211_ioctl.c,v
retrieving revision 1.77
diff -u -p -u -p -r1.77 ieee80211_ioctl.c
--- net80211/ieee80211_ioctl.c 11 Nov 2019 18:07:21 -0000 1.77
+++ net80211/ieee80211_ioctl.c 12 Jan 2020 18:38:44 -0000
@@ -540,6 +540,17 @@ ieee80211_ioctl(struct ifnet *ifp, u_lon
error = ENETRESET;
}
} else {
+ /*
+ * We are reconfiguring the active essid,
+ * so reset the interface.
+ */
+ 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;
--
If the American dream is for Americans only, it will remain our dream
and never be our destiny.
-- René de Visme Williamson