diff options
author | Steven Barth <steven@midlink.org> | 2015-08-20 11:33:23 +0200 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2015-08-20 11:33:23 +0200 |
commit | 5b12eeba475a3301c362cf59f138ec7aa60d2dd9 (patch) | |
tree | f0e0e4a98f4585e7c2e514e5020e30a9fa17fabd /src/dhcpv6.c | |
parent | 2fd5d19525699f19186daca9b246dd37a0f547a0 (diff) |
router/dhcpv6: use link-local addresses for DNS
Diffstat (limited to 'src/dhcpv6.c')
-rw-r--r-- | src/dhcpv6.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dhcpv6.c b/src/dhcpv6.c index c62a08f..9f91162 100644 --- a/src/dhcpv6.c +++ b/src/dhcpv6.c @@ -228,7 +228,7 @@ static void handle_client_request(void *addr, void *data, size_t len, size_t dns_cnt = iface->dns_cnt; if ((dns_cnt == 0) && - odhcpd_get_preferred_interface_address(iface->ifindex, &dns_addr)) { + !odhcpd_get_linklocal_interface_address(iface->ifindex, &dns_addr)) { dns_addr_ptr = &dns_addr; dns_cnt = 1; } @@ -460,7 +460,7 @@ static void relay_server_response(uint8_t *data, size_t len) size_t rewrite_cnt = iface->dns_cnt; if (rewrite_cnt == 0) { - if (odhcpd_get_preferred_interface_address(iface->ifindex, &addr) < 1) + if (odhcpd_get_linklocal_interface_address(iface->ifindex, &addr)) return; // Unable to get interface address rewrite = &addr; |