From: Pasi Sjöholm <pasi.sjoh...@jollamobile.com>

__connman_service_nameserver_append() must be called after the
resolver entry has been appended to entry_list and dnsproxy
because otherwise searchdomain_add_all()-call on service
will not add the search domain configuration to nameserver
configured through RDNSS.
---
 src/resolver.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/resolver.c b/src/resolver.c
index 6a64938..53e9ebb 100644
--- a/src/resolver.c
+++ b/src/resolver.c
@@ -378,18 +378,6 @@ static int append_resolver(int index, const char *domain,
 
                entry->timeout = g_timeout_add_seconds(interval,
                                resolver_refresh_cb, entry);
-
-               /*
-                * We update the service only for those nameservers
-                * that are automagically added via netlink (lifetime > 0)
-                */
-               if (server && entry->index >= 0) {
-                       struct connman_service *service;
-                       service = 
__connman_service_lookup_from_index(entry->index);
-                       if (service)
-                               __connman_service_nameserver_append(service,
-                                                               server, true);
-               }
        }
 
        if (entry->index >= 0 && entry->server)
@@ -402,6 +390,18 @@ static int append_resolver(int index, const char *domain,
        else
                __connman_resolvfile_append(entry->index, domain, server);
 
+       /*
+        * We update the service only for those nameservers
+        * that are automagically added via netlink (lifetime > 0)
+        */
+       if (server && entry->index >= 0 && lifetime) {
+               struct connman_service *service;
+               service = __connman_service_lookup_from_index(entry->index);
+               if (service)
+                       __connman_service_nameserver_append(service,
+                                                       server, true);
+       }
+
        return 0;
 }
 
-- 
2.1.4

_______________________________________________
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman

Reply via email to