From 71447415372535d220bc1ff4ab1589345846ecbf Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Thu, 19 Dec 2024 10:17:01 -0800 Subject: [PATCH] netdev: destroy auth-proto after external auth With external auth there is no associate event meaning the auth proto never gets freed, which prevents eapol from starting inside the OCI callback. Check for this specific case and free the auth proto after signaling that external auth has completed. --- src/netdev.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/netdev.c b/src/netdev.c index 02496c92..2a6d94fc 100644 --- a/src/netdev.c +++ b/src/netdev.c @@ -3483,6 +3483,13 @@ static void netdev_external_auth_sae_tx_associate(void *user_data) netdev_send_external_auth(netdev, MMPDU_STATUS_CODE_SUCCESS); netdev_ensure_eapol_registered(netdev); + + /* + * Free the auth proto now. With external auth there is no associate + * event which is where this normally gets cleaned up. + */ + auth_proto_free(netdev->ap); + netdev->ap = NULL; } struct rtnl_data {