]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Prevent mesh_fwding field in network config when CONFIG_MESH is disabled
authorsunilravi <sunilravi@google.com>
Fri, 21 Mar 2025 22:23:03 +0000 (22:23 +0000)
committerJouni Malinen <j@w1.fi>
Sun, 23 Mar 2025 08:39:39 +0000 (10:39 +0200)
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 <sunilravi@google.com>
wpa_supplicant/config_file.c

index 0f53753fa44dbde02ef510d7002411c708bdc582..26c7d44bc7b0feb3babb622c108ad5a129c37fce 100644 (file)
@@ -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);