From: Pasi Sjöholm <[email protected]>
searchdomain_add_all()-function must be called when nameservers are
modified for the service as the IPv4- and IPv6-ipconfig won't
become connected at the same time and calling searchdomain_add_all()
only once when the service becomes ready-state is not enough.
Also nameserver-configuration coming from eg. IPv6 RA RDNSS
(__connman_service_nameserver_append()) must have search domains
applied to it.
---
src/service.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/service.c b/src/service.c
index e33284d..3fc5b60 100644
--- a/src/service.c
+++ b/src/service.c
@@ -134,6 +134,7 @@ static struct connman_ipconfig *create_ip4config(struct
connman_service *service
static struct connman_ipconfig *create_ip6config(struct connman_service
*service,
int index);
+static int searchdomain_add_all(struct connman_service *service);
struct find_data {
const char *path;
@@ -966,11 +967,7 @@ static int nameserver_add_all(struct connman_service
*service,
service->nameservers_config[i]);
i++;
}
-
- return 0;
- }
-
- if (service->nameservers) {
+ } else if (service->nameservers) {
while (service->nameservers[i]) {
nameserver_add(service, type,
service->nameservers[i]);
@@ -978,6 +975,8 @@ static int nameserver_add_all(struct connman_service
*service,
}
}
+ searchdomain_add_all(service);
+
return 0;
}
@@ -1121,6 +1120,8 @@ int __connman_service_nameserver_append(struct
connman_service *service,
nameserver_add(service, CONNMAN_IPCONFIG_TYPE_ALL, nameserver);
}
+ searchdomain_add_all(service);
+
return 0;
}
@@ -5378,7 +5379,6 @@ static int service_indicate_state(struct connman_service
*service)
g_get_current_time(&service->modified);
service_save(service);
- searchdomain_add_all(service);
dns_changed(service);
domain_changed(service);
proxy_changed(service);
--
2.1.4
_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman