[PATCH] eap: fix the duplicated registration of eap server

Maochen Wang maochen.wang at nxp.com
Sun Aug 4 20:16:08 PDT 2024


>From ca0b2812a3f2ce1952a805212a02e99f70da786f Mon Sep 17 00:00:00 2001
From: Maochen Wang mailto:maochen.wang at nxp.com
Date: Tue, 30 Jul 2024 17:30:40 +0800
Subject: [PATCH] eap: fix the duplicated registration of eap server
method

Fix the duplicated registration of eap server method, as on Zephyr OS,
hostapd and supplicant are running in same task, when hostapd enabled,
eap_server_register_methods() will also call the eap server related
functions, which leads to the duplicated registration of eap server
method.

Signed-off-by: Maochen Wang mailto:maochen.wang at nxp.com
---
wpa_supplicant/eap_register.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/wpa_supplicant/eap_register.c b/wpa_supplicant/eap_register.c
index 3f018c4b3..d009be5dd 100644
--- a/wpa_supplicant/eap_register.c
+++ b/wpa_supplicant/eap_register.c
@@ -152,6 +152,7 @@ int eap_register_methods(void)
            ret = eap_peer_eke_register();
#endif /* EAP_EKE */

+#ifndef HOSTAPD
#ifdef EAP_SERVER_IDENTITY
     if (ret == 0)
            ret = eap_server_identity_register();
@@ -266,6 +267,6 @@ int eap_register_methods(void)
     if (ret == 0)
            ret = eap_server_pwd_register();
#endif /* EAP_SERVER_PWD */
-
+#endif /* HOSTAPD *
     return ret;
}
-- 
2.25.1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-noup-eap-fix-the-duplicated-registration-of-eap-serv.patch
Type: application/octet-stream
Size: 1234 bytes
Desc: 0001-noup-eap-fix-the-duplicated-registration-of-eap-serv.patch
URL: <http://lists.infradead.org/pipermail/hostap/attachments/20240805/7677b232/attachment.obj>


More information about the Hostap mailing list