always display the deftxkey for an 802.11 device if privacy is enabled
This commit is contained in:
parent
060cd8af25
commit
3ce8a7b4fc
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=138718
@ -1382,9 +1382,10 @@ ieee80211_status(int s, const struct rt_addrinfo *info __unused)
|
|||||||
ireq.i_type = IEEE80211_IOC_WEP;
|
ireq.i_type = IEEE80211_IOC_WEP;
|
||||||
if (ioctl(s, SIOCG80211, &ireq) != -1 &&
|
if (ioctl(s, SIOCG80211, &ireq) != -1 &&
|
||||||
ireq.i_val != IEEE80211_WEP_NOSUP) {
|
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:
|
case IEEE80211_WEP_OFF:
|
||||||
LINE_CHECK("%cprivacy OFF", spacer);
|
LINE_CHECK("%cprivacy OFF", spacer);
|
||||||
break;
|
break;
|
||||||
@ -1396,7 +1397,7 @@ ieee80211_status(int s, const struct rt_addrinfo *info __unused)
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
LINE_CHECK("%cprivacy UNKNOWN (0x%x)",
|
LINE_CHECK("%cprivacy UNKNOWN (0x%x)",
|
||||||
spacer, ireq.i_val);
|
spacer, wepmode);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1412,7 +1413,7 @@ ieee80211_status(int s, const struct rt_addrinfo *info __unused)
|
|||||||
}
|
}
|
||||||
if (ireq.i_val != -1)
|
if (ireq.i_val != -1)
|
||||||
LINE_CHECK("%cdeftxkey %d", spacer, 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);
|
LINE_CHECK("%cdeftxkey UNDEF", spacer);
|
||||||
|
|
||||||
ireq.i_type = IEEE80211_IOC_NUMWEPKEYS;
|
ireq.i_type = IEEE80211_IOC_NUMWEPKEYS;
|
||||||
|
Loading…
Reference in New Issue
Block a user