]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Extend wpa_parse_kde_ies() to include EHT capabilities
authorKiran Kumar Lokere <quic_klokere@quicinc.com>
Thu, 9 Feb 2023 08:25:30 +0000 (00:25 -0800)
committerJouni Malinen <j@w1.fi>
Fri, 8 Sep 2023 09:51:30 +0000 (12:51 +0300)
This is needed for TDLS.

Signed-off-by: Jouni Malinen <quic_klokere@quicinc.com>
src/common/wpa_common.c
src/common/wpa_common.h

index 1e7a2bd1a275fe0b4032164d4a53543a3b0d908e..ead724baf72266d16cfc09f0799764dd42e7ab58 100644 (file)
@@ -3706,6 +3706,11 @@ int wpa_parse_kde_ies(const u8 *buf, size_t len, struct wpa_eapol_ie_parse *ie)
                           sizeof(struct ieee80211_he_6ghz_band_cap) &&
                           pos[2] == WLAN_EID_EXT_HE_6GHZ_BAND_CAP) {
                        ie->he_6ghz_capabilities = pos + 3;
+               } else if (*pos == WLAN_EID_EXTENSION &&
+                          pos[1] >= 1 + IEEE80211_EHT_CAPAB_MIN_LEN &&
+                          pos[2] == WLAN_EID_EXT_EHT_CAPABILITIES) {
+                       ie->eht_capabilities = pos + 3;
+                       ie->eht_capab_len = pos[1] - 1;
                } else if (*pos == WLAN_EID_QOS && pos[1] >= 1) {
                        ie->qosinfo = pos[2];
                } else if (*pos == WLAN_EID_SUPPORTED_CHANNELS) {
index 80c7d324fd42388f61b66be110817c2c10b64479..1269bf95d1504065da935908086736685fe0aa29 100644 (file)
@@ -689,6 +689,8 @@ struct wpa_eapol_ie_parse {
        const u8 *he_capabilities;
        size_t he_capab_len;
        const u8 *he_6ghz_capabilities;
+       const u8 *eht_capabilities;
+       size_t eht_capab_len;
        const u8 *supp_channels;
        size_t supp_channels_len;
        const u8 *supp_oper_classes;