summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorphessler <phessler@openbsd.org>2018-10-27 09:47:36 +0000
committerphessler <phessler@openbsd.org>2018-10-27 09:47:36 +0000
commit490a20a23aaf889920be6602bdc37057c968bb40 (patch)
treed69c4d32444187e3dece2bcd46fef9c8ebddb95c
parentTemporarily enable LOCKF_DIAGNOSTIC in order to catch potential bugs. (diff)
downloadwireguard-openbsd-490a20a23aaf889920be6602bdc37057c968bb40.tar.xz
wireguard-openbsd-490a20a23aaf889920be6602bdc37057c968bb40.zip
don't join to a network where we expect cleartext, and the AP is using crypto
OK stsp@
-rw-r--r--sys/net80211/ieee80211_node.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c
index 1353eaa04a2..d7b941cf9c6 100644
--- a/sys/net80211/ieee80211_node.c
+++ b/sys/net80211/ieee80211_node.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ieee80211_node.c,v 1.152 2018/09/18 06:36:18 mestre Exp $ */
+/* $OpenBSD: ieee80211_node.c,v 1.153 2018/10/27 09:47:36 phessler Exp $ */
/* $NetBSD: ieee80211_node.c,v 1.14 2004/05/09 09:18:47 dyoung Exp $ */
/*-
@@ -523,6 +523,9 @@ ieee80211_match_ess(struct ieee80211_ess *ess, struct ieee80211_node *ni)
} else if (ess->flags & IEEE80211_F_WEPON) {
if ((ni->ni_capinfo & IEEE80211_CAPINFO_PRIVACY) == 0)
return 0;
+ } else {
+ if ((ni->ni_capinfo & IEEE80211_CAPINFO_PRIVACY) != 0)
+ return 0;
}
return 1;