]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
DPP: Enable GAS server in hostapd without CONFIG_INTERWORKING=y
authorJouni Malinen <jouni.malinen@oss.qualcomm.com>
Tue, 27 May 2025 20:12:33 +0000 (23:12 +0300)
committerJouni Malinen <j@w1.fi>
Tue, 27 May 2025 20:12:33 +0000 (23:12 +0300)
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 <jouni.malinen@oss.qualcomm.com>
src/ap/hostapd.c
src/ap/sta_info.c

index 049777b0a12de87d52321cdfea802f0a548bafb8..7f2ebecb87647ebb6a2ece8b674245ba55713e62 100644 (file)
@@ -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,
index 49f7c898457c13e254e0c0b9e0bddcb66ef00900..da5693c8a0e9dd8f016df8a5a13fd2a63fcb2b3b 100644 (file)
@@ -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);