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

Jouni Malinen j at w1.fi
Sat Aug 10 00:37:41 PDT 2024


On Mon, Aug 05, 2024 at 03:16:08AM +0000, Maochen Wang wrote:
> 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.

So this is somehow building both hostapd/*.c and wpa_supplicant/*.c code
into a single binary? I'd expect that to fail due to conflicting
symbols, so this needs some other changes as well and those do not exist
in hostap.git..

> diff --git a/wpa_supplicant/eap_register.c b/wpa_supplicant/eap_register.c
> +#ifndef HOSTAPD
> #ifdef EAP_SERVER_IDENTITY

That feels strange from hostap.git view point. There is nothing there
that would result in HOSTAPD being defined when compiling
wpa_supplicant/*.c.

If this is needed for some custom builds that have modified the way the
process is initiated using changes that do not exist in hostap.git, it
would seem cleaner to keep this change in those out-of-hostap.git
changes as well.
 
-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list