summaryrefslogtreecommitdiff
path: root/src/dnsproxy.c
diff options
context:
space:
mode:
authorJukka Rissanen <jukka.rissanen@linux.intel.com>2013-04-04 14:44:53 +0300
committerPatrik Flykt <patrik.flykt@linux.intel.com>2013-04-05 14:43:23 +0300
commit429c4652e56aea608d7cc7624dfdd88dd7beec30 (patch)
treece5c3855133d75922a52286be84680bf60cb1ce3 /src/dnsproxy.c
parent23d1596d90296c27309826d83f4e29795b54c987 (diff)
downloadconnman-429c4652e56aea608d7cc7624dfdd88dd7beec30.tar.gz
connman-429c4652e56aea608d7cc7624dfdd88dd7beec30.tar.bz2
connman-429c4652e56aea608d7cc7624dfdd88dd7beec30.zip
dnsproxy: Do not add or remove ::1 server
Diffstat (limited to 'src/dnsproxy.c')
-rw-r--r--src/dnsproxy.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/dnsproxy.c b/src/dnsproxy.c
index 77a86f72..d54ca70a 100644
--- a/src/dnsproxy.c
+++ b/src/dnsproxy.c
@@ -2327,6 +2327,9 @@ int __connman_dnsproxy_append(int index, const char *domain,
if (g_str_equal(server, "127.0.0.1") == TRUE)
return -ENODEV;
+ if (g_str_equal(server, "::1") == TRUE)
+ return -ENODEV;
+
data = find_server(index, server, IPPROTO_UDP);
if (data != NULL) {
append_domain(index, domain);
@@ -2363,6 +2366,9 @@ int __connman_dnsproxy_remove(int index, const char *domain,
if (g_str_equal(server, "127.0.0.1") == TRUE)
return -ENODEV;
+ if (g_str_equal(server, "::1") == TRUE)
+ return -ENODEV;
+
remove_server(index, domain, server, IPPROTO_UDP);
remove_server(index, domain, server, IPPROTO_TCP);