summaryrefslogtreecommitdiff
path: root/src/resolver.c
diff options
context:
space:
mode:
authorPatrik Flykt <patrik.flykt@linux.intel.com>2012-04-11 16:29:02 +0300
committerPatrik Flykt <patrik.flykt@linux.intel.com>2012-04-12 13:55:13 +0300
commita7212a3e398a7f51067068e48749a662a1c052f1 (patch)
tree6ea9c3f9eca77a97b26b3bd4589e09365952c367 /src/resolver.c
parentb1eebf293510bd89827343a5fc495ef0a9b6905d (diff)
downloadconnman-a7212a3e398a7f51067068e48749a662a1c052f1.tar.gz
connman-a7212a3e398a7f51067068e48749a662a1c052f1.tar.bz2
connman-a7212a3e398a7f51067068e48749a662a1c052f1.zip
resolver: Append fallback nameservers
Append fallback nameservers, if any. Remove functions for adding removing public nameservers since they are not used anymore.
Diffstat (limited to 'src/resolver.c')
-rw-r--r--src/resolver.c35
1 files changed, 9 insertions, 26 deletions
diff --git a/src/resolver.c b/src/resolver.c
index 53ccf90b..9796717f 100644
--- a/src/resolver.c
+++ b/src/resolver.c
@@ -456,32 +456,6 @@ int connman_resolver_remove_all(const char *interface)
}
/**
- * connman_resolver_append_public_server:
- * @server: server address
- *
- * Append public resolver server address to current list
- */
-int connman_resolver_append_public_server(const char *server)
-{
- DBG("server %s", server);
-
- return append_resolver(NULL, NULL, server, 0, RESOLVER_FLAG_PUBLIC);
-}
-
-/**
- * connman_resolver_remove_public_server:
- * @server: server address
- *
- * Remove public resolver server address to current list
- */
-int connman_resolver_remove_public_server(const char *server)
-{
- DBG("server %s", server);
-
- return connman_resolver_remove(NULL, NULL, server);
-}
-
-/**
* connman_resolver_flush:
*
* Flush pending resolver requests
@@ -514,6 +488,9 @@ static void free_resolvfile(gpointer data)
int __connman_resolver_init(connman_bool_t dnsproxy)
{
+ int i;
+ char **ns;
+
DBG("dnsproxy %d", dnsproxy);
if (dnsproxy == FALSE)
@@ -526,6 +503,12 @@ int __connman_resolver_init(connman_bool_t dnsproxy)
dnsproxy_enabled = TRUE;
+ ns = connman_setting_get_string_list("FallbackNameservers");
+ for (i = 0; ns != NULL && ns[i] != NULL; i += 1) {
+ DBG("server %s", ns[i]);
+ append_resolver(NULL, NULL, ns[i], 0, RESOLVER_FLAG_PUBLIC);
+ }
+
return 0;
}