sd-network: add sd_network_linkg_get_domains()

For now this only exposes the domain name (DHCP Option 15), and not
the search string (DHCP Option 119), which will be implemented in
a follow-up patch.
This commit is contained in:
Tom Gundersen
2014-08-14 23:13:14 +02:00
parent 9d685ca819
commit 9b4d1882ca
3 changed files with 16 additions and 0 deletions
+9
View File
@@ -1763,6 +1763,15 @@ int link_save(Link *link) {
fputs("\n", f);
if (link->network->dhcp_domainname &&
link->dhcp_lease) {
const char *domainname;
r = sd_dhcp_lease_get_domainname(link->dhcp_lease, &domainname);
if (r >= 0)
fprintf(f, "DOMAINS=%s\n", domainname);
}
fprintf(f, "LLMNR=%s\n",
llmnr_support_to_string(link->network->llmnr));
}