diff options
author | sam <sam@FreeBSD.org> | 2004-12-12 04:32:44 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2004-12-12 04:32:44 +0000 |
commit | e2397d35247ef4fb9d31194500b9cc079ec3d1fc (patch) | |
tree | fb2a1d0aadc9e459dcb1936a0884e970569c72aa /sbin | |
parent | 4f6eebc3382bfd27d7d148ad9834b988a319e537 (diff) | |
download | FreeBSD-src-e2397d35247ef4fb9d31194500b9cc079ec3d1fc.zip FreeBSD-src-e2397d35247ef4fb9d31194500b9cc079ec3d1fc.tar.gz |
always display the deftxkey for an 802.11 device if privacy is enabled
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/ifconfig/ifieee80211.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sbin/ifconfig/ifieee80211.c b/sbin/ifconfig/ifieee80211.c index d7800d4..9c24eb3 100644 --- a/sbin/ifconfig/ifieee80211.c +++ b/sbin/ifconfig/ifieee80211.c @@ -1382,9 +1382,10 @@ ieee80211_status(int s, const struct rt_addrinfo *info __unused) ireq.i_type = IEEE80211_IOC_WEP; if (ioctl(s, SIOCG80211, &ireq) != -1 && ireq.i_val != IEEE80211_WEP_NOSUP) { - int firstkey; + int firstkey, wepmode; - switch (ireq.i_val) { + wepmode = ireq.i_val; + switch (wepmode) { case IEEE80211_WEP_OFF: LINE_CHECK("%cprivacy OFF", spacer); break; @@ -1396,7 +1397,7 @@ ieee80211_status(int s, const struct rt_addrinfo *info __unused) break; default: LINE_CHECK("%cprivacy UNKNOWN (0x%x)", - spacer, ireq.i_val); + spacer, wepmode); break; } @@ -1412,7 +1413,7 @@ ieee80211_status(int s, const struct rt_addrinfo *info __unused) } if (ireq.i_val != -1) LINE_CHECK("%cdeftxkey %d", spacer, ireq.i_val+1); - else if (verbose) + else if (wepmode != IEEE80211_WEP_OFF || verbose) LINE_CHECK("%cdeftxkey UNDEF", spacer); ireq.i_type = IEEE80211_IOC_NUMWEPKEYS; |