[PATCH] Add WPA_IGNORE_CONFIG_ERRORS option to continue in

Dmitry Shmidt dimitrysh at google.com
Fri Oct 29 17:22:28 EDT 2010


case of bad config

Signed-off-by: Dmitry Shmidt <dimitrysh at google.com>
---
 hostapd/config_file.c        |    2 ++
 wpa_supplicant/config_file.c |    2 ++
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/hostapd/config_file.c b/hostapd/config_file.c
index a6a3e5c..7eaf683 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
@@ -2068,6 +2068,7 @@ struct hostapd_config *
hostapd_config_read(const char *fname)
 			bss->ssid.security_policy = SECURITY_PLAINTEXT;
 	}

+#ifndef WPA_IGNORE_CONFIG_ERRORS
 	if (hostapd_config_check(conf))
 		errors++;

@@ -2077,6 +2078,7 @@ struct hostapd_config *
hostapd_config_read(const char *fname)
 		hostapd_config_free(conf);
 		conf = NULL;
 	}
+#endif

 	return conf;
 }
diff --git a/wpa_supplicant/config_file.c b/wpa_supplicant/config_file.c
index 2431e84..4ed5e0a 100644
--- a/wpa_supplicant/config_file.c
+++ b/wpa_supplicant/config_file.c
@@ -331,11 +331,13 @@ struct wpa_config * wpa_config_read(const char *name)
 	config->ssid = head;
 	wpa_config_debug_dump_networks(config);

+#ifndef WPA_IGNORE_CONFIG_ERRORS
 	if (errors) {
 		wpa_config_free(config);
 		config = NULL;
 		head = NULL;
 	}
+#endif

 	return config;
 }
-- 
1.6.2.2


More information about the HostAP mailing list