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

Redoing dns servers will remove the current list of search domains
from the servers/resolvers (eg. RDNSS configured ones) therefore they need
to be added back.
---
 src/resolver.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/src/resolver.c b/src/resolver.c
index 53e9ebb..5c463be 100644
--- a/src/resolver.c
+++ b/src/resolver.c
@@ -600,6 +600,27 @@ int __connman_resolver_redo_servers(int index)
                                        entry->server);
        }
 
+       /*
+        * We want to re-add all search domains back to search
+        * domain lists as they just got removed for IPv6-servers (above).
+        * Removal of search domains is not necessary
+        * as there can be only one instance of each search domain
+        * in the each dns-servers search domain list.
+        */
+
+       for (list = entry_list; list; list = list->next) {
+               struct entry_data *entry = list->data;
+
+               if (entry->index != index)
+                       continue;
+
+               if (entry->server)
+                       continue;
+
+               __connman_dnsproxy_append(entry->index, entry->domain,
+                                       NULL);
+       }
+
        return 0;
 }
 
-- 
2.1.4

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

Reply via email to