diff options
author | Tom Gundersen <teg@jklm.no> | 2014-03-13 20:46:45 +0100 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2014-03-14 12:44:17 +0100 |
commit | 06f021a8048583d66202e3ac5cd0a12386d33ac2 (patch) | |
tree | 407112a3da562091ca371ebd1cff2e9f5bf3faf8 /src/network/networkd-manager.c | |
parent | 0ea51a1129b9984a3c6d96cef1b0e33c99b5e9cf (diff) |
networkd: allow more than one static DNS server
Diffstat (limited to 'src/network/networkd-manager.c')
-rw-r--r-- | src/network/networkd-manager.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/network/networkd-manager.c b/src/network/networkd-manager.c index 8c2f5efbd3..c730e7148d 100644 --- a/src/network/networkd-manager.c +++ b/src/network/networkd-manager.c @@ -442,10 +442,17 @@ int manager_update_resolv_conf(Manager *m) { } } - HASHMAP_FOREACH(link, m->links, i) - if (link->network && link->network->dns) - append_dns(f, &link->network->dns->in_addr.in, - link->network->dns->family, &count); + HASHMAP_FOREACH(link, m->links, i) { + if (link->network && link->network->dns) { + Address *address; + Iterator j; + + SET_FOREACH(address, link->network->dns, j) { + append_dns(f, &address->in_addr.in, + address->family, &count); + } + } + } fflush(f); |