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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx
---
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)
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ret =3D eap_peer_eke_register();
#endif /* EAP_EKE */

+#ifndef HOSTAPD
#ifdef EAP_SERVER_IDENTITY
=A0=A0=A0=A0 if (ret =3D=3D 0)
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ret =3D eap_server_identity_register();
@@ -266,6 +267,6 @@ int eap_register_methods(void)
=A0=A0=A0=A0 if (ret =3D=3D 0)
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ret =3D eap_server_pwd_register();
#endif /* EAP_SERVER_PWD */
-
+#endif /* HOSTAPD *
=A0=A0=A0=A0 return ret;
}
--=20
2.25.1

--_002_AM9PR04MB8779F78D6F29DB3395EA064881BE2AM9PR04MB8779eurp_
Content-Type: application/octet-stream;
	name="0001-noup-eap-fix-the-duplicated-registration-of-eap-serv.patch"
Content-Description:  0001-noup-eap-fix-the-duplicated-registration-of-eap-serv.patch
Content-Disposition: attachment;
	filename="0001-noup-eap-fix-the-duplicated-registration-of-eap-serv.patch";
	size=1234; creation-date="Mon, 05 Aug 2024 03:15:40 GMT";
	modification-date="Mon, 05 Aug 2024 03:16:07 GMT"
Content-Transfer-Encoding: base64

RnJvbSBjYTBiMjgxMmEzZjJjZTE5NTJhODA1M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Yi93cGFfc3VwcGxpY2FudC9lYXBfcmVnaXN0ZXIuYwpAQCAtMTUyLDYgKzE1Miw3
IEBAIGludCBlYXBfcmVnaXN0ZXJfbWV0aG9kcyh2b2lkKQogCQlyZXQgPSBlYXBfcGVlcl9la2Vf
cmVnaXN0ZXIoKTsKICNlbmRpZiAvKiBFQVBfRUtFICovCiAKKyNpZm5kZWYgSE9TVEFQRAogI2lm
ZGVmIEVBUF9TRVJWRVJfSURFTlRJVFkKIAlpZiAocmV0ID09IDApCiAJCXJldCA9IGVhcF9zZXJ2
ZXJfaWRlbnRpdHlfcmVnaXN0ZXIoKTsKQEAgLTI2Niw2ICsyNjcsNiBAQCBpbnQgZWFwX3JlZ2lz
dGVyX21ldGhvZHModm9pZCkKIAlpZiAocmV0ID09IDApCiAJCXJldCA9IGVhcF9zZXJ2ZXJfcHdk
X3JlZ2lzdGVyKCk7CiAjZW5kaWYgLyogRUFQX1NFUlZFUl9QV0QgKi8KLQorI2VuZGlmIC8qIEhP
U1RBUEQgKgogCXJldHVybiByZXQ7CiB9Ci0tIAoyLjI1LjEKCg==

--_002_AM9PR04MB8779F78D6F29DB3395EA064881BE2AM9PR04MB8779eurp_
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap

--_002_AM9PR04MB8779F78D6F29DB3395EA064881BE2AM9PR04MB8779eurp_--




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux