summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2017-03-12 03:18:58 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2017-03-12 03:18:58 +0000
commit9449af23e68085c6958a84a1da45d22b783b8099 (patch)
tree4b807620f64669243021ae83edc612da3118dc0d /sbin
parent6342e05f19d8d19befc6bbb0252382351687c735 (diff)
Make ifconfig scan display both wpa1 and wpa2 if both are supported.
ok henning@ phessler@
Diffstat (limited to 'sbin')
-rw-r--r--sbin/ifconfig/ifconfig.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c
index c5db44c1c1b..608f9715792 100644
--- a/sbin/ifconfig/ifconfig.c
+++ b/sbin/ifconfig/ifconfig.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ifconfig.c,v 1.338 2017/03/11 13:22:36 stsp Exp $ */
+/* $OpenBSD: ifconfig.c,v 1.339 2017/03/12 03:18:57 stsp Exp $ */
/* $NetBSD: ifconfig.c,v 1.40 1997/10/01 02:19:43 enami Exp $ */
/*
@@ -2375,11 +2375,12 @@ ieee80211_printnode(struct ieee80211_nodereq *nr)
if (nr->nr_capinfo) {
printb_status(nr->nr_capinfo, IEEE80211_CAPINFO_BITS);
if (nr->nr_capinfo & IEEE80211_CAPINFO_PRIVACY) {
- if (nr->nr_rsnprotos & IEEE80211_WPA_PROTO_WPA2)
- fputs(",wpa2", stdout);
- else if (nr->nr_rsnprotos & IEEE80211_WPA_PROTO_WPA1)
- fputs(",wpa1", stdout);
- else
+ if (nr->nr_rsnprotos) {
+ if (nr->nr_rsnprotos & IEEE80211_WPA_PROTO_WPA2)
+ fputs(",wpa2", stdout);
+ if (nr->nr_rsnprotos & IEEE80211_WPA_PROTO_WPA1)
+ fputs(",wpa1", stdout);
+ } else
fputs(",wep", stdout);
if (nr->nr_rsnakms & IEEE80211_WPA_AKM_8021X ||