Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F133435386
D50554.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D50554.diff
View Options
diff --git a/sbin/ifconfig/ifieee80211.c b/sbin/ifconfig/ifieee80211.c
--- a/sbin/ifconfig/ifieee80211.c
+++ b/sbin/ifconfig/ifieee80211.c
@@ -4898,6 +4898,7 @@
{
int s = ctx->io_s;
static const uint8_t zerobssid[IEEE80211_ADDR_LEN];
+ uint8_t bssid[IEEE80211_ADDR_LEN];
enum ieee80211_opmode opmode = get80211opmode(ctx);
int i, num, wpa, wme, bgscan, bgscaninterval, val, len, wepmode;
uint8_t data[32];
@@ -4948,10 +4949,10 @@
} else if (verbose)
printf(" channel UNDEF");
- if (get80211(ctx, IEEE80211_IOC_BSSID, data, IEEE80211_ADDR_LEN) >= 0 &&
- (memcmp(data, zerobssid, sizeof(zerobssid)) != 0 || verbose)) {
- printf(" bssid %s", ether_ntoa((struct ether_addr *)data));
- printbssidname((struct ether_addr *)data);
+ if (get80211(ctx, IEEE80211_IOC_BSSID, bssid, IEEE80211_ADDR_LEN) >= 0 &&
+ (memcmp(bssid, zerobssid, sizeof(zerobssid)) != 0 || verbose)) {
+ printf(" bssid %s", ether_ntoa((struct ether_addr *)bssid));
+ printbssidname((struct ether_addr *)bssid);
}
if (get80211len(ctx, IEEE80211_IOC_STATIONNAME, data, sizeof(data), &len) != -1) {
@@ -5107,6 +5108,21 @@
printkey(ctx, &ik);
}
}
+ if (opmode == IEEE80211_M_STA && wpa >= 2) {
+ struct ieee80211req_key ik;
+ int error;
+
+ memset(&ik, 0, sizeof(ik));
+ ik.ik_keyix = IEEE80211_KEYIX_NONE;
+ memcpy(ik.ik_macaddr, bssid, sizeof(ik.ik_macaddr));
+ error = get80211(ctx, IEEE80211_IOC_WPAKEY, &ik, sizeof(ik));
+ if (error == 0 && ik.ik_keylen != 0) {
+ if (verbose)
+ LINE_BREAK();
+ printkey(ctx, &ik);
+ i++;
+ }
+ }
if (i > 0 && verbose)
LINE_BREAK();
end:
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Oct 26, 6:49 PM (7 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
24246004
Default Alt Text
D50554.diff (1 KB)
Attached To
Mode
D50554: ifconfig: 802.11: print node unicast key (PTK) if available in STA mode
Attached
Detach File
Event Timeline
Log In to Comment