summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstsp <stsp@openbsd.org>2019-08-29 09:13:56 +0000
committerstsp <stsp@openbsd.org>2019-08-29 09:13:56 +0000
commit0deee38c9d35402457fee66c46457a053c0db776 (patch)
treec873d6aa06bb79eb3f7e7858abd67c353f66aff0
parentAdd support for RTL8153B after study of Linux r8152 driver. (diff)
downloadwireguard-openbsd-0deee38c9d35402457fee66c46457a053c0db776.tar.xz
wireguard-openbsd-0deee38c9d35402457fee66c46457a053c0db776.zip
Always parse RSN/WPA IEs if the driver announces support for RSN.
Prevents WPA APs from appearing as non-WPA APs to the AP selection logic. The decision whether or not to parse the IE was made as a side-effect of a check for the highest mutually supported version of WPA. We can safely assume that all our drivers support WPA versions <= 2 and parse the IE regardless of whether WPA is currently active or not. ok mpi@
-rw-r--r--sys/net80211/ieee80211_input.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c
index 31842d7d3ff..73a9d522950 100644
--- a/sys/net80211/ieee80211_input.c
+++ b/sys/net80211/ieee80211_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ieee80211_input.c,v 1.207 2019/07/29 10:50:08 stsp Exp $ */
+/* $OpenBSD: ieee80211_input.c,v 1.208 2019/08/29 09:13:56 stsp Exp $ */
/*-
* Copyright (c) 2001 Atsushi Onoe
@@ -1676,7 +1676,7 @@ ieee80211_recv_probe_resp(struct ieee80211com *ic, struct mbuf *m,
*/
if (rsnie != NULL &&
(ni->ni_supported_rsnprotos & IEEE80211_PROTO_RSN) &&
- (ic->ic_rsnprotos & IEEE80211_PROTO_RSN)) {
+ (ic->ic_caps & IEEE80211_C_RSN)) {
if (ieee80211_save_ie(rsnie, &ni->ni_rsnie) == 0
#ifndef IEEE80211_STA_ONLY
&& ic->ic_opmode != IEEE80211_M_HOSTAP
@@ -1692,7 +1692,7 @@ ieee80211_recv_probe_resp(struct ieee80211com *ic, struct mbuf *m,
}
} else if (wpaie != NULL &&
(ni->ni_supported_rsnprotos & IEEE80211_PROTO_WPA) &&
- (ic->ic_rsnprotos & IEEE80211_PROTO_WPA)) {
+ (ic->ic_caps & IEEE80211_C_RSN)) {
if (ieee80211_save_ie(wpaie, &ni->ni_rsnie) == 0
#ifndef IEEE80211_STA_ONLY
&& ic->ic_opmode != IEEE80211_M_HOSTAP