From: Lior David Date: Wed, 30 Aug 2017 13:38:15 +0000 (+0300) Subject: mesh: Move writing of mesh_rssi_threshold inside CONFIG_MESH X-Git-Tag: hostap_2_7~1112 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=30311339834bb9f426a36ad31b95860af130a4ae;p=thirdparty%2Fhostap.git mesh: Move writing of mesh_rssi_threshold inside CONFIG_MESH Previously, the code that writes mesh_rssi_threshold to a network block always executes, but the code that reads it from network block and the code that initializes it to a default value in a new network block are inside #ifdef CONFIG_MESH. As a result when writing a config file it will write mesh_rssi_threshold (since it has a non-default value) and later fail to read the network block. Fix this by moving the write code under #ifdef CONFIG_MESH as well. Note, network blocks which already have mesh_rssi_threshold because of the bug will still fail to read after the fix. Signed-off-by: Lior David --- diff --git a/wpa_supplicant/config_file.c b/wpa_supplicant/config_file.c index 692b2005c..5ccd00387 100644 --- a/wpa_supplicant/config_file.c +++ b/wpa_supplicant/config_file.c @@ -795,7 +795,6 @@ static void wpa_config_write_network(FILE *f, struct wpa_ssid *ssid) #endif /* IEEE8021X_EAPOL */ INT(mode); INT(no_auto_peer); - INT_DEF(mesh_rssi_threshold, DEFAULT_MESH_RSSI_THRESHOLD); INT(frequency); INT(fixed_freq); #ifdef CONFIG_ACS @@ -845,6 +844,7 @@ static void wpa_config_write_network(FILE *f, struct wpa_ssid *ssid) INT_DEF(dot11MeshRetryTimeout, DEFAULT_MESH_RETRY_TIMEOUT); INT_DEF(dot11MeshConfirmTimeout, DEFAULT_MESH_CONFIRM_TIMEOUT); INT_DEF(dot11MeshHoldingTimeout, DEFAULT_MESH_HOLDING_TIMEOUT); + INT_DEF(mesh_rssi_threshold, DEFAULT_MESH_RSSI_THRESHOLD); #endif /* CONFIG_MESH */ INT(wpa_ptk_rekey); INT(group_rekey);