diff options
author | Hans Dedecker <dedeckeh@gmail.com> | 2017-04-03 09:47:08 +0200 |
---|---|---|
committer | Hans Dedecker <dedeckeh@gmail.com> | 2017-04-05 17:49:45 +0200 |
commit | 6e0acecbacdb5bf1ce0b71d4c2512eae4606be57 (patch) | |
tree | 5b51761d0e5f5d878a243f2dd5a731b6051a7320 /interface-ip.c | |
parent | a03216660797173fbe67866f75564e3fec9c1e8d (diff) |
interface-ip: fix device name for IPv6 link-local DNS server
Commit 235a02424c3ab1b59308895c4f00395dacf2557c adds support for IPv6 link-local
DNS server by appending the device name; however the interface ifname parameter
does not always contain the layer 3 device name (e.g it can hold the aliased
interface name)
Fix this by passing the device name of the referenced layer 3 device.
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'interface-ip.c')
-rw-r--r-- | interface-ip.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/interface-ip.c b/interface-ip.c index dd4e01c..140ef34 100644 --- a/interface-ip.c +++ b/interface-ip.c @@ -1287,13 +1287,14 @@ __interface_write_dns_entries(FILE *f) avl_for_each_element(&resolv_conf_iface_entries, entry, node) { iface = (struct interface *)entry->node.key; + struct device *dev = iface->l3_dev.dev; fprintf(f, "# Interface %s\n", iface->name); - write_resolv_conf_entries(f, &iface->config_ip, iface->ifname); + write_resolv_conf_entries(f, &iface->config_ip, dev->ifname); if (!iface->proto_ip.no_dns) - write_resolv_conf_entries(f, &iface->proto_ip, iface->ifname); + write_resolv_conf_entries(f, &iface->proto_ip, dev->ifname); } avl_remove_all_elements(&resolv_conf_iface_entries, entry, node, n_entry) |