summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-link.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-08-14 22:18:22 +0200
committerTom Gundersen <teg@jklm.no>2014-08-14 23:38:38 +0200
commitbda2c408f8a739c19161818bcc842107f60652a2 (patch)
tree7bb4b74f35847ac121f62b4290591bd80c895172 /src/resolve/resolved-link.c
parent9b4d1882ca46d5b2ae7d028ec2b5d0d0c3a46a76 (diff)
resolved: pull in domain names from sd-network
Diffstat (limited to 'src/resolve/resolved-link.c')
-rw-r--r--src/resolve/resolved-link.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/resolve/resolved-link.c b/src/resolve/resolved-link.c
index 8ec180d3a4..f47017ced8 100644
--- a/src/resolve/resolved-link.c
+++ b/src/resolve/resolved-link.c
@@ -223,12 +223,30 @@ clear:
return r;
}
+static int link_update_domains(Link *l) {
+ int r;
+
+ if (!l->unicast_scope)
+ return 0;
+
+ strv_free(l->unicast_scope->domains);
+ l->unicast_scope->domains = NULL;
+
+ r = sd_network_link_get_domains(l->ifindex,
+ &l->unicast_scope->domains);
+ if (r < 0)
+ return r;
+
+ return 0;
+}
+
int link_update_monitor(Link *l) {
assert(l);
link_update_dns_servers(l);
link_update_llmnr_support(l);
link_allocate_scopes(l);
+ link_update_domains(l);
link_add_rrs(l, false);
return 0;