From: Jouni Malinen Date: Sun, 18 Jul 2010 03:25:41 +0000 (-0700) Subject: Fix wpa_supplicant AP mode to ignore EAPOL Supplicant port callback X-Git-Tag: hostap-1-bp~1258 X-Git-Url: http://www.project-moonshot.org/gitweb/?a=commitdiff_plain;ds=sidebyside;h=69a6b47aa0a4716ce8f3ceb253e5e1276cd4e85f;p=mech_eap.git Fix wpa_supplicant AP mode to ignore EAPOL Supplicant port callback This is needed to avoid setting EAPOL PAE port status incorrectly when using wpa_supplicant to control AP mode operations. --- diff --git a/wpa_supplicant/wpas_glue.c b/wpa_supplicant/wpas_glue.c index a3622b3..4af0cd0 100644 --- a/wpa_supplicant/wpas_glue.c +++ b/wpa_supplicant/wpas_glue.c @@ -560,6 +560,14 @@ static void wpa_supplicant_eap_param_needed(void *ctx, const char *field, static void wpa_supplicant_port_cb(void *ctx, int authorized) { struct wpa_supplicant *wpa_s = ctx; +#ifdef CONFIG_AP + if (wpa_s->ap_iface) { + wpa_printf(MSG_DEBUG, "AP mode active - skip EAPOL Supplicant " + "port status: %s", + authorized ? "Authorized" : "Unauthorized"); + return; + } +#endif /* CONFIG_AP */ wpa_printf(MSG_DEBUG, "EAPOL: Supplicant port status: %s", authorized ? "Authorized" : "Unauthorized"); wpa_drv_set_supp_port(wpa_s, authorized);