[PATCH 2/8] common: Add RSN parsing for Extended Key ID

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add parsing for RSN_KEY_DATA_KEYID to wpa_parse_generic().

Signed-off-by: Alexander Wetzel <alexander@xxxxxxxxxxxxxx>
---
 src/common/wpa_common.c | 8 ++++++++
 src/common/wpa_common.h | 1 +
 2 files changed, 9 insertions(+)

diff --git a/src/common/wpa_common.c b/src/common/wpa_common.c
index c63d7bce1..31db391fd 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 + 1 &&
+	    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 7850c878e..1a9a4105f 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;
-- 
2.25.1


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux