From: sunilravi Date: Fri, 21 Mar 2025 22:23:03 +0000 (+0000) Subject: Prevent mesh_fwding field in network config when CONFIG_MESH is disabled X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ffd707e40add7da8ba88a673959b2e920dcbe9e;p=thirdparty%2Fhostap.git Prevent mesh_fwding field in network config when CONFIG_MESH is disabled mesh_fwding and no_auto_peer configuration items are parsed within ifdef CONFIG_MESH, but they are written without matching conditional compilation. This could result in configuration files that cannot be read back by the same wpa_supplicant binary if either of those configuration values could end up getting modified. Make the configuration file writing code use matching ifdef CONFIG_MESH for these parameters to be consistent with the configuration reader. Signed-off-by: sunilravi --- diff --git a/wpa_supplicant/config_file.c b/wpa_supplicant/config_file.c index 0f53753fa..26c7d44bc 100644 --- a/wpa_supplicant/config_file.c +++ b/wpa_supplicant/config_file.c @@ -866,8 +866,10 @@ static void wpa_config_write_network(FILE *f, struct wpa_ssid *ssid) INT_DEFe(sim_num, sim_num, DEFAULT_USER_SELECTED_SIM); #endif /* IEEE8021X_EAPOL */ INT(mode); +#ifdef CONFIG_MESH INT(no_auto_peer); INT_DEF(mesh_fwding, DEFAULT_MESH_FWDING); +#endif /* CONFIG_MESH */ INT(frequency); INT(enable_edmg); INT(edmg_channel);