diff mbox series

[v2,16/18] eapol: include IGTK in 4-way handshake as AP

Message ID 20240506003518.320176-17-brandtwjohn@gmail.com (mailing list archive)
State New
Headers show
Series Basic WPA3 support in AP mode | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
prestwoj/iwd-ci-gitlint success GitLint

Commit Message

John Brandt May 6, 2024, 12:30 a.m. UTC
When SAE with MFP is being used, include the IGTK in message 3 of the
4-way handshake.
---
 src/eapol.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Comments

Denis Kenzior May 7, 2024, 4:20 p.m. UTC | #1
Hi John,

On 5/5/24 7:30 PM, John Brandt wrote:
> When SAE with MFP is being used, include the IGTK in message 3 of the
> 4-way handshake.
> ---
>   src/eapol.c | 12 ++++++++++++
>   1 file changed, 12 insertions(+)
> 

Applied after amending > 80 char line.

Regards,
-Denis
diff mbox series

Patch

diff --git a/src/eapol.c b/src/eapol.c
index 524a26c9..8b21b886 100644
--- a/src/eapol.c
+++ b/src/eapol.c
@@ -1454,6 +1454,18 @@  static void eapol_send_ptk_3_of_4(struct eapol_sm *sm)
 		key_data_len += gtk_kde[1] + 2;
 	}
 
+	if (sm->handshake->mfp) {
+		enum crypto_cipher group_management_cipher = ie_rsn_cipher_suite_to_cipher(
+				sm->handshake->group_management_cipher);
+		uint8_t *igtk_kde = key_data_buf + key_data_len;
+
+		handshake_util_build_igtk_kde(group_management_cipher,
+						sm->handshake->igtk,
+						sm->handshake->igtk_index,
+						igtk_kde);
+		key_data_len += igtk_kde[1] + 2;
+	}
+
 	if (sm->handshake->support_ip_allocation &&
 			!sm->handshake->client_ip_addr) {
 		handshake_event(sm->handshake, HANDSHAKE_EVENT_P2P_IP_REQUEST);