OCV: Parse all types of OCI information elements
Add functionality to parse all variations of the OCI element. Signed-off-by: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
This commit is contained in:
parent
17c2559caf
commit
f53aeff415
8 changed files with 44 additions and 0 deletions
|
@ -465,6 +465,17 @@ static int wpa_parse_generic(const u8 *pos, const u8 *end,
|
|||
}
|
||||
#endif /* CONFIG_P2P */
|
||||
|
||||
#ifdef CONFIG_OCV
|
||||
if (pos[1] >= RSN_SELECTOR_LEN + 1 &&
|
||||
RSN_SELECTOR_GET(pos + 2) == RSN_KEY_DATA_OCI) {
|
||||
ie->oci = pos + 2 + RSN_SELECTOR_LEN;
|
||||
ie->oci_len = pos[1] - RSN_SELECTOR_LEN;
|
||||
wpa_hexdump(MSG_DEBUG, "WPA: OCI KDE in EAPOL-Key",
|
||||
pos, pos[1] + 2);
|
||||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_OCV */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -53,6 +53,10 @@ struct wpa_eapol_ie_parse {
|
|||
const u8 *ip_addr_req;
|
||||
const u8 *ip_addr_alloc;
|
||||
#endif /* CONFIG_P2P */
|
||||
#ifdef CONFIG_OCV
|
||||
const u8 *oci;
|
||||
size_t oci_len;
|
||||
#endif /* CONFIG_OCV */
|
||||
};
|
||||
|
||||
int wpa_supplicant_parse_ies(const u8 *buf, size_t len,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue