[PATCH] dnsproxy: Fallback to resolv.conf if dnsproxy fails

Daniel Wagner wagi at monom.org
Thu Jan 27 06:18:26 PST 2011


From: Daniel Wagner <daniel.wagner at bmw-carit.de>

In case dnsproxy can't create the socket listener we
should fall back to resolv.conf.

Reported by Kalle Valo <kalle.valo at canonical.com>
---
 src/main.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/main.c b/src/main.c
index 08f2555..3a8d44d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -227,8 +227,9 @@ int main(int argc, char *argv[])
 	__connman_config_init();
 	__connman_stats_init();
 
+	if (__connman_dnsproxy_init(option_dnsproxy) < 0)
+		option_dnsproxy = FALSE;
 	__connman_resolver_init(option_dnsproxy);
-	__connman_dnsproxy_init(option_dnsproxy);
 	__connman_ipconfig_init();
 	__connman_rtnl_init();
 	__connman_task_init();
-- 
1.7.3.5




More information about the connman mailing list