]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
eapol_test: Move Message-Authenticator attribute to be the first one
authorJouni Malinen <j@w1.fi>
Sat, 16 Mar 2024 09:16:12 +0000 (11:16 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 9 Jul 2024 11:58:39 +0000 (14:58 +0300)
Even if this is not strictly speaking necessary for mitigating certain
RADIUS protocol attacks, be consistent with the RADIUS server behavior
and move the Message-Authenticator attribute to be the first attribute
in the message from RADIUS client.

Signed-off-by: Jouni Malinen <j@w1.fi>
wpa_supplicant/eapol_test.c

index 95953de928bd2e11ac679d55655c966ca69de68a..0c17aaea418ccff95df3745788b3b58969514a20 100644 (file)
@@ -195,6 +195,9 @@ static void ieee802_1x_encapsulate_radius(struct eapol_test_data *e,
                return;
        }
 
+       if (!radius_msg_add_msg_auth(msg))
+               goto fail;
+
        radius_msg_make_authenticator(msg);
 
        hdr = (const struct eap_hdr *) eap;