]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
wlantest: Use wpa_parse_kde_ies() directly
authorJouni Malinen <quic_jouni@quicinc.com>
Wed, 28 Sep 2022 20:07:08 +0000 (23:07 +0300)
committerJouni Malinen <j@w1.fi>
Wed, 28 Sep 2022 20:07:08 +0000 (23:07 +0300)
Make this easier to understand by using the appropriately named function
to parse KDEs/IEs in the Key Data field of EAPOL-Key frames instead of
using the wrapper function that is there just to provide the old
function name for wpa_supplicant.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
wlantest/rx_eapol.c

index 0db2587bda9d96b5005d77d0c0694b0f1c86ba94..a8f67881f2724d4416cdbe2ba498719d90df4523 100644 (file)
@@ -108,7 +108,7 @@ static void rx_data_eapol_key_1_of_4(struct wlantest *wt, const u8 *dst,
        key_data = mic + mic_len + 2;
        key_data_len = WPA_GET_BE16(mic + mic_len);
 
-       if (wpa_supplicant_parse_ies(key_data, key_data_len, &ie) < 0) {
+       if (wpa_parse_kde_ies(key_data, key_data_len, &ie) < 0) {
                add_note(wt, MSG_INFO, "Failed to parse EAPOL-Key Key Data");
                return;
        }
@@ -335,7 +335,7 @@ static void rx_data_eapol_key_2_of_4(struct wlantest *wt, const u8 *dst,
        key_data = mic + mic_len + 2;
        key_data_len = WPA_GET_BE16(mic + mic_len);
 
-       if (wpa_supplicant_parse_ies(key_data, key_data_len, &ie) < 0) {
+       if (wpa_parse_kde_ies(key_data, key_data_len, &ie) < 0) {
                add_note(wt, MSG_INFO, "Failed to parse EAPOL-Key Key Data");
                return;
        }
@@ -520,7 +520,7 @@ static void learn_kde_keys(struct wlantest *wt, struct wlantest_bss *bss,
 {
        struct wpa_eapol_ie_parse ie;
 
-       if (wpa_supplicant_parse_ies(buf, len, &ie) < 0) {
+       if (wpa_parse_kde_ies(buf, len, &ie) < 0) {
                add_note(wt, MSG_INFO, "Failed to parse EAPOL-Key Key Data");
                return;
        }
@@ -835,7 +835,7 @@ static void rx_data_eapol_key_3_of_4(struct wlantest *wt, const u8 *dst,
                                     decrypted, plain_len);
        }
 
-       if (wpa_supplicant_parse_ies(decrypted, decrypted_len, &ie) < 0) {
+       if (wpa_parse_kde_ies(decrypted, decrypted_len, &ie) < 0) {
                add_note(wt, MSG_INFO, "Failed to parse EAPOL-Key Key Data");
                os_free(decrypted_buf);
                return;