summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorphessler <phessler@openbsd.org>2018-09-10 08:27:13 +0000
committerphessler <phessler@openbsd.org>2018-09-10 08:27:13 +0000
commit6f3a9be0d970137daa3fd7ce8525ea4580e60bb3 (patch)
treebbdc00daee45abb3a711e85eaf4b70a223553a07
parentgive set_ess a len variable, so we can correctly match the essid we want (diff)
downloadwireguard-openbsd-6f3a9be0d970137daa3fd7ce8525ea4580e60bb3.tar.xz
wireguard-openbsd-6f3a9be0d970137daa3fd7ce8525ea4580e60bb3.zip
use the correct essid when switching during the ioctl path
pointed out by stsp@
-rw-r--r--sys/net80211/ieee80211_ioctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net80211/ieee80211_ioctl.c b/sys/net80211/ieee80211_ioctl.c
index 65c6948414e..7f51c998dc5 100644
--- a/sys/net80211/ieee80211_ioctl.c
+++ b/sys/net80211/ieee80211_ioctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ieee80211_ioctl.c,v 1.65 2018/09/09 20:32:55 phessler Exp $ */
+/* $OpenBSD: ieee80211_ioctl.c,v 1.66 2018/09/10 08:27:13 phessler Exp $ */
/* $NetBSD: ieee80211_ioctl.c,v 1.15 2004/05/06 02:58:16 dyoung Exp $ */
/*-
@@ -475,7 +475,7 @@ ieee80211_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
if (ieee80211_add_ess(ic, &join) == 0)
ic->ic_flags |= IEEE80211_F_AUTO_JOIN;
}
- ieee80211_set_ess(ic, ic->ic_des_essid);
+ ieee80211_set_ess(ic, join.i_nwid, join.i_len);
error = ENETRESET;
break;
case SIOCG80211JOIN: