aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/config_file.c
diff options
context:
space:
mode:
authorPurushottam Kushwaha <p.kushwaha@samsung.com>2016-01-15 11:00:06 (GMT)
committerJouni Malinen <j@w1.fi>2016-01-15 18:23:25 (GMT)
commit17d32eb3d323596e8df8070a742525f58214f560 (patch)
tree381a6c23502cd7767cac3f527e7b6c6d4948b2dc /wpa_supplicant/config_file.c
parentbcce934755ce444cb885628e175df6515f8d390f (diff)
downloadhostap-17d32eb3d323596e8df8070a742525f58214f560.zip
hostap-17d32eb3d323596e8df8070a742525f58214f560.tar.gz
hostap-17d32eb3d323596e8df8070a742525f58214f560.tar.bz2
Allow re-write of ip_addr* configurations to conf file.
This patch keeps ip_addr* configuration in conf file while updating supplicant conf file either internally by supplicant or due to save_config command. Signed-off-by: Purushottam Kushwaha <p.kushwaha@samsung.com> Signed-off-by: Avichal Agarwal <avichal.a@samsung.com>
Diffstat (limited to 'wpa_supplicant/config_file.c')
-rw-r--r--wpa_supplicant/config_file.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/wpa_supplicant/config_file.c b/wpa_supplicant/config_file.c
index 6ea113e..c9ba8b7 100644
--- a/wpa_supplicant/config_file.c
+++ b/wpa_supplicant/config_file.c
@@ -1140,6 +1140,22 @@ static void wpa_config_write_global(FILE *f, struct wpa_config *config)
if (config->p2p_go_freq_change_policy != DEFAULT_P2P_GO_FREQ_MOVE)
fprintf(f, "p2p_go_freq_change_policy=%u\n",
config->p2p_go_freq_change_policy);
+ if (WPA_GET_BE32(config->ip_addr_go))
+ fprintf(f, "ip_addr_go=%u.%u.%u.%u\n",
+ config->ip_addr_go[0], config->ip_addr_go[1],
+ config->ip_addr_go[2], config->ip_addr_go[3]);
+ if (WPA_GET_BE32(config->ip_addr_mask))
+ fprintf(f, "ip_addr_mask=%u.%u.%u.%u\n",
+ config->ip_addr_mask[0], config->ip_addr_mask[1],
+ config->ip_addr_mask[2], config->ip_addr_mask[3]);
+ if (WPA_GET_BE32(config->ip_addr_start))
+ fprintf(f, "ip_addr_start=%u.%u.%u.%u\n",
+ config->ip_addr_start[0], config->ip_addr_start[1],
+ config->ip_addr_start[2], config->ip_addr_start[3]);
+ if (WPA_GET_BE32(config->ip_addr_end))
+ fprintf(f, "ip_addr_end=%u.%u.%u.%u\n",
+ config->ip_addr_end[0], config->ip_addr_end[1],
+ config->ip_addr_end[2], config->ip_addr_end[3]);
#endif /* CONFIG_P2P */
if (config->country[0] && config->country[1]) {
fprintf(f, "country=%c%c\n",