Fix: Prevent mesh_fwding field in network config when CONFIG_MESH is disabled.
Commit b375b7630f5625c764b21896ac0ab3bd87b41739 introduced the mesh_fwding
field in the network configuration by default. On devices where CONFIG_MESH
is disabled, this resulted in an "unknown field" error during subsequent
network block parsing. This error prevented P2P from loading saved network
configurations, disrupting persistent connections.
This commit resolves the issue by conditionally compiling the code that
writes the mesh_fwding field into the configuration file, ensuring it's only
included when CONFIG_MESH is enabled.
Bug: 394110783
Test: Manual - P2P connect/disconnect via Wi-Fi Direct UI
Change-Id: I8fd80405076915116cd21dcda50ce9d9b188dfda
diff --git a/wpa_supplicant/config_file.c b/wpa_supplicant/config_file.c
index 331726c..57bfbed 100644
--- a/wpa_supplicant/config_file.c
+++ b/wpa_supplicant/config_file.c
@@ -867,7 +867,9 @@
#endif /* IEEE8021X_EAPOL */
INT(mode);
INT(no_auto_peer);
+#ifdef CONFIG_MESH
INT_DEF(mesh_fwding, DEFAULT_MESH_FWDING);
+#endif /* CONFIG_MESH */
INT(frequency);
INT(enable_edmg);
INT(edmg_channel);