From: Jouni Malinen Date: Tue, 27 May 2025 20:12:33 +0000 (+0300) Subject: DPP: Enable GAS server in hostapd without CONFIG_INTERWORKING=y X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0788a8757987986e76054d391a802c0ee24f78e6;p=thirdparty%2Fhostap.git DPP: Enable GAS server in hostapd without CONFIG_INTERWORKING=y CONFIG_DPP=y was sufficient to include the GAS server functionality into the hostapd build, but a couple of the calls did not cover the possibility of CONFIG_DPP=y being used without CONFIG_INTERWORKING=y. In practice, this prevented hostapd from operating as the DPP Configurator without CONFIG_INTERWORKING=y. Fix this by enabling GAS server if either CONFIG_INTERWORKING or CONFIG_DPP have been defined consistently. Signed-off-by: Jouni Malinen --- diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c index 049777b0a..7f2ebecb8 100644 --- a/src/ap/hostapd.c +++ b/src/ap/hostapd.c @@ -558,9 +558,9 @@ void hostapd_free_hapd_data(struct hostapd_data *hapd) wpabuf_free(hapd->time_adv); hapd->time_adv = NULL; -#ifdef CONFIG_INTERWORKING +#if defined(CONFIG_INTERWORKING) || defined(CONFIG_DPP) gas_serv_deinit(hapd); -#endif /* CONFIG_INTERWORKING */ +#endif /* CONFIG_INTERWORKING || CONFIG_DPP */ bss_load_update_deinit(hapd); ndisc_snoop_deinit(hapd); @@ -1679,12 +1679,12 @@ setup_mld: return -1; } -#ifdef CONFIG_INTERWORKING +#if defined(CONFIG_INTERWORKING) || defined(CONFIG_DPP) if (gas_serv_init(hapd)) { wpa_printf(MSG_ERROR, "GAS server initialization failed"); return -1; } -#endif /* CONFIG_INTERWORKING */ +#endif /* CONFIG_INTERWORKING || CONFIG_DPP */ if (conf->qos_map_set_len && hostapd_drv_set_qos_map(hapd, conf->qos_map_set, diff --git a/src/ap/sta_info.c b/src/ap/sta_info.c index 49f7c8984..da5693c8a 100644 --- a/src/ap/sta_info.c +++ b/src/ap/sta_info.c @@ -394,7 +394,7 @@ void ap_free_sta(struct hostapd_data *hapd, struct sta_info *sta) p2p_group_notif_disassoc(hapd->p2p_group, sta->addr); #endif /* CONFIG_P2P */ -#ifdef CONFIG_INTERWORKING +#if defined(CONFIG_INTERWORKING) || defined(CONFIG_DPP) if (sta->gas_dialog) { int i; @@ -402,7 +402,7 @@ void ap_free_sta(struct hostapd_data *hapd, struct sta_info *sta) gas_serv_dialog_clear(&sta->gas_dialog[i]); os_free(sta->gas_dialog); } -#endif /* CONFIG_INTERWORKING */ +#endif /* CONFIG_INTERWORKING || CONFIG_DPP */ wpabuf_free(sta->wps_ie); wpabuf_free(sta->p2p_ie);