From b5a6e00c32bf531e9b35b826b2474654d923a27f Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Wed, 25 Mar 2009 12:00:30 +0100 Subject: [PATCH] Make sure entry for 127.0.0.1 is written to /etc/resolv.conf --- plugins/dnsproxy.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/plugins/dnsproxy.c b/plugins/dnsproxy.c index 84ad596..fb4411d 100644 --- a/plugins/dnsproxy.c +++ b/plugins/dnsproxy.c @@ -209,6 +209,9 @@ static int dnsproxy_append(const char *interface, const char *domain, DBG("interface %s server %s", interface, server); + if (g_str_equal(server, "127.0.0.1") == TRUE) + return -ENODEV; + data = create_server(interface, server); if (data == NULL) return -EIO; @@ -225,6 +228,9 @@ static int dnsproxy_remove(const char *interface, const char *domain, DBG("interface %s server %s", interface, server); + if (g_str_equal(server, "127.0.0.1") == TRUE) + return -ENODEV; + data = find_server(interface, server); if (data == NULL) return 0; @@ -428,6 +434,8 @@ static int create_listener(void) listener_watch = g_io_add_watch(listener_channel, G_IO_IN, listener_event, NULL); + connman_resolver_append("lo", NULL, "127.0.0.1"); + return 0; } @@ -437,6 +445,8 @@ static void destroy_listener(void) DBG(""); + connman_resolver_remove_all("lo"); + if (listener_watch > 0) g_source_remove(listener_watch); -- 2.7.4