diff options
author | 2017-03-11 13:22:36 +0000 | |
---|---|---|
committer | 2017-03-11 13:22:36 +0000 | |
commit | 849fcdcaa8377797cf80a9fd3acda80e74ee615d (patch) | |
tree | 4c824f12027a061a3b2c25205a8c9b872dff01b1 /sys | |
parent | Add a detachhook to pfsync(4) which deals with the syncdev going away. (diff) | |
download | wireguard-openbsd-849fcdcaa8377797cf80a9fd3acda80e74ee615d.tar.xz wireguard-openbsd-849fcdcaa8377797cf80a9fd3acda80e74ee615d.zip |
Make 'ifconfig scan' display AP encryption correctly if WEP is configured
on the local wifi interface. ifconfig was mistakenly showing the common
supported subset of client and AP, rather than showing the AP's capabilities.
Exposes WPA protocol capabilities in struct ieee80211_nodereq, which means
ifconfig must be recompiled to run on a new kernel.
ok deraadt@ mpi@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net80211/ieee80211_ioctl.c | 7 | ||||
-rw-r--r-- | sys/net80211/ieee80211_ioctl.h | 3 |
2 files changed, 8 insertions, 2 deletions
diff --git a/sys/net80211/ieee80211_ioctl.c b/sys/net80211/ieee80211_ioctl.c index 971d21f620d..08ba495e096 100644 --- a/sys/net80211/ieee80211_ioctl.c +++ b/sys/net80211/ieee80211_ioctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_ioctl.c,v 1.48 2017/01/19 01:07:35 stsp Exp $ */ +/* $OpenBSD: ieee80211_ioctl.c,v 1.49 2017/03/11 13:22:36 stsp Exp $ */ /* $NetBSD: ieee80211_ioctl.c,v 1.15 2004/05/06 02:58:16 dyoung Exp $ */ /*- @@ -107,6 +107,11 @@ ieee80211_node2req(struct ieee80211com *ic, const struct ieee80211_node *ni, /* RSN */ nr->nr_rsnciphers = ni->ni_rsnciphers; nr->nr_rsnakms = 0; + nr->nr_rsnprotos = 0; + if (ni->ni_rsnprotos & IEEE80211_PROTO_WPA) + nr->nr_rsnprotos |= IEEE80211_WPA_PROTO_WPA1; + if (ni->ni_rsnprotos & IEEE80211_PROTO_RSN) + nr->nr_rsnprotos |= IEEE80211_WPA_PROTO_WPA2; if (ni->ni_rsnakms & IEEE80211_AKM_8021X) nr->nr_rsnakms |= IEEE80211_WPA_AKM_8021X; if (ni->ni_rsnakms & IEEE80211_AKM_PSK) diff --git a/sys/net80211/ieee80211_ioctl.h b/sys/net80211/ieee80211_ioctl.h index 3ab99117681..0151b6962db 100644 --- a/sys/net80211/ieee80211_ioctl.h +++ b/sys/net80211/ieee80211_ioctl.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_ioctl.h,v 1.27 2016/08/15 22:14:19 stsp Exp $ */ +/* $OpenBSD: ieee80211_ioctl.h,v 1.28 2017/03/11 13:22:36 stsp Exp $ */ /* $NetBSD: ieee80211_ioctl.h,v 1.7 2004/04/30 22:51:04 dyoung Exp $ */ /*- @@ -328,6 +328,7 @@ struct ieee80211_nodereq { u_int16_t nr_state; /* node state in the cache */ /* RSN */ + u_int nr_rsnprotos; u_int nr_rsnciphers; u_int nr_rsnakms; |