From 9c7aac738b77505b074baa4dee9452ebaebb4891 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 12 Mar 2017 00:23:36 +0200 Subject: [PATCH] OWE: Define and parse Diffie-Hellman Parameter element Add WLAN_EID_EXT_OWE_DH_PARAM definition and extend ieee802_11_parse_elems() to recognize this element. Signed-off-by: Jouni Malinen --- src/common/ieee802_11_common.c | 6 ++++++ src/common/ieee802_11_common.h | 2 ++ src/common/ieee802_11_defs.h | 1 + 3 files changed, 9 insertions(+) diff --git a/src/common/ieee802_11_common.c b/src/common/ieee802_11_common.c index 4a0491575..dc99f8b90 100644 --- a/src/common/ieee802_11_common.c +++ b/src/common/ieee802_11_common.c @@ -250,6 +250,12 @@ static int ieee802_11_parse_extension(const u8 *pos, size_t elen, break; elems->fils_nonce = pos; break; + case WLAN_EID_EXT_OWE_DH_PARAM: + if (elen < 2) + break; + elems->owe_dh = pos; + elems->owe_dh_len = elen; + break; default: if (show_errors) { wpa_printf(MSG_MSGDUMP, diff --git a/src/common/ieee802_11_common.h b/src/common/ieee802_11_common.h index b3a74f11e..ff2f8e761 100644 --- a/src/common/ieee802_11_common.h +++ b/src/common/ieee802_11_common.h @@ -78,6 +78,7 @@ struct ieee802_11_elems { const u8 *fils_wrapped_data; const u8 *fils_pk; const u8 *fils_nonce; + const u8 *owe_dh; u8 ssid_len; u8 supp_rates_len; @@ -120,6 +121,7 @@ struct ieee802_11_elems { u8 key_delivery_len; u8 fils_wrapped_data_len; u8 fils_pk_len; + u8 owe_dh_len; struct mb_ies_info mb_ies; }; diff --git a/src/common/ieee802_11_defs.h b/src/common/ieee802_11_defs.h index afe2651a8..d57bb0c99 100644 --- a/src/common/ieee802_11_defs.h +++ b/src/common/ieee802_11_defs.h @@ -462,6 +462,7 @@ #define WLAN_EID_EXT_FILS_PUBLIC_KEY 12 #define WLAN_EID_EXT_FILS_NONCE 13 #define WLAN_EID_EXT_FUTURE_CHANNEL_GUIDANCE 14 +#define WLAN_EID_EXT_OWE_DH_PARAM 32 /* Action frame categories (IEEE Std 802.11-2016, 9.4.1.11, Table 9-76) */