aboutsummaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorAlexander Wetzel <alexander@wetzel-home.de>2020-03-15 19:04:20 (GMT)
committerJouni Malinen <j@w1.fi>2020-03-15 21:17:56 (GMT)
commit094c9cdc7e17666532ec248998d2bf46b09c5f24 (patch)
tree42138febd631beec9a04a1fd74dd70253f208c9b /src/common
parentf5c0104f3bc5ebfa00f2de956f2ecbdf3367756a (diff)
downloadhostap-094c9cdc7e17666532ec248998d2bf46b09c5f24.zip
hostap-094c9cdc7e17666532ec248998d2bf46b09c5f24.tar.gz
hostap-094c9cdc7e17666532ec248998d2bf46b09c5f24.tar.bz2
Add parsing of Key ID KDE for Extended Key ID
wpa_parse_generic() can now recognize the Key ID KDE that will be needed to deliver the Key ID of the pairwise key when Extended Key ID is used. Signed-off-by: Alexander Wetzel <alexander@wetzel-home.de>
Diffstat (limited to 'src/common')
-rw-r--r--src/common/wpa_common.c8
-rw-r--r--src/common/wpa_common.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/src/common/wpa_common.c b/src/common/wpa_common.c
index c63d7bc..e8a4a2b 100644
--- a/src/common/wpa_common.c
+++ b/src/common/wpa_common.c
@@ -2717,6 +2717,14 @@ static int wpa_parse_generic(const u8 *pos, const u8 *end,
return 0;
}
+ if (pos[1] >= RSN_SELECTOR_LEN + 2 &&
+ RSN_SELECTOR_GET(pos + 2) == RSN_KEY_DATA_KEYID) {
+ ie->key_id = pos + 2 + RSN_SELECTOR_LEN;
+ wpa_hexdump(MSG_DEBUG, "WPA: KeyID in EAPOL-Key",
+ pos, pos[1] + 2);
+ return 0;
+ }
+
if (pos[1] > RSN_SELECTOR_LEN + 2 &&
RSN_SELECTOR_GET(pos + 2) == RSN_KEY_DATA_GROUPKEY) {
ie->gtk = pos + 2 + RSN_SELECTOR_LEN;
diff --git a/src/common/wpa_common.h b/src/common/wpa_common.h
index 7850c87..1a9a410 100644
--- a/src/common/wpa_common.h
+++ b/src/common/wpa_common.h
@@ -494,6 +494,7 @@ struct wpa_eapol_ie_parse {
const u8 *rsn_ie;
size_t rsn_ie_len;
const u8 *pmkid;
+ const u8 *key_id;
const u8 *gtk;
size_t gtk_len;
const u8 *mac_addr;