aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Wetzel <alexander@wetzel-home.de>2020-03-15 19:04:25 (GMT)
committerJouni Malinen <j@w1.fi>2020-03-15 22:07:20 (GMT)
commit6ea7a152c6de012c517eb6e1b0e197f33bac7722 (patch)
tree1f38274779c4350b4e04530324fe75e597f81202
parent796253a65f5875bb60d4f3a51dc938a193a3c36f (diff)
downloadhostap-6ea7a152c6de012c517eb6e1b0e197f33bac7722.zip
hostap-6ea7a152c6de012c517eb6e1b0e197f33bac7722.tar.gz
hostap-6ea7a152c6de012c517eb6e1b0e197f33bac7722.tar.bz2
wlantest: Basic Extended Key ID support
Signed-off-by: Alexander Wetzel <alexander@wetzel-home.de>
-rw-r--r--wlantest/bss.c6
-rw-r--r--wlantest/rx_data.c10
-rw-r--r--wlantest/rx_eapol.c3
3 files changed, 14 insertions, 5 deletions
diff --git a/wlantest/bss.c b/wlantest/bss.c
index 0556c72..3208e65 100644
--- a/wlantest/bss.c
+++ b/wlantest/bss.c
@@ -290,7 +290,7 @@ void bss_update(struct wlantest *wt, struct wlantest_bss *bss,
"group=%s%s%s%s%s%s%s%s%s"
"mgmt_group_cipher=%s%s%s%s%s"
"key_mgmt=%s%s%s%s%s%s%s%s%s"
- "rsn_capab=%s%s%s%s%s%s",
+ "rsn_capab=%s%s%s%s%s%s%s",
MAC2STR(bss->bssid),
bss->proto == 0 ? "OPEN " : "",
bss->proto & WPA_PROTO_WPA ? "WPA " : "",
@@ -341,7 +341,9 @@ void bss_update(struct wlantest *wt, struct wlantest_bss *bss,
bss->rsn_capab & WPA_CAPABILITY_MFPC ? "MFPC " : "",
bss->rsn_capab & WPA_CAPABILITY_PEERKEY_ENABLED ?
"PEERKEY " : "",
- bss->rsn_capab & WPA_CAPABILITY_OCVC ? "OCVC " : "");
+ bss->rsn_capab & WPA_CAPABILITY_OCVC ? "OCVC " : "",
+ bss->rsn_capab & WPA_CAPABILITY_EXT_KEY_ID_FOR_UNICAST ?
+ "ExtKeyID " : "");
}
diff --git a/wlantest/rx_data.c b/wlantest/rx_data.c
index d86a588..1ee25a6 100644
--- a/wlantest/rx_data.c
+++ b/wlantest/rx_data.c
@@ -466,9 +466,13 @@ static void rx_data_bss_prot(struct wlantest *wt,
}
keyid = data[3] >> 6;
- if (keyid != 0) {
- add_note(wt, MSG_INFO, "Unexpected non-zero KeyID %d in "
- "individually addressed Data frame from " MACSTR,
+ if (keyid != 0 &&
+ (!(sta->rsn_capab & WPA_CAPABILITY_EXT_KEY_ID_FOR_UNICAST) ||
+ !(bss->rsn_capab & WPA_CAPABILITY_EXT_KEY_ID_FOR_UNICAST) ||
+ keyid != 1)) {
+ add_note(wt, MSG_INFO,
+ "Unexpected KeyID %d in individually addressed Data frame from "
+ MACSTR,
keyid, MAC2STR(hdr->addr2));
}
diff --git a/wlantest/rx_eapol.c b/wlantest/rx_eapol.c
index 2e49929..1cfdf8e 100644
--- a/wlantest/rx_eapol.c
+++ b/wlantest/rx_eapol.c
@@ -464,6 +464,9 @@ static void learn_kde_keys(struct wlantest *wt, struct wlantest_bss *bss,
ie.rsn_ie, ie.rsn_ie_len);
}
+ if (ie.key_id)
+ add_note(wt, MSG_DEBUG, "KeyID %u", ie.key_id[0]);
+
if (ie.gtk) {
wpa_hexdump(MSG_MSGDUMP, "EAPOL-Key Key Data - GTK KDE",
ie.gtk, ie.gtk_len);