diff options
author | Hans Dedecker <dedeckeh@gmail.com> | 2017-03-29 17:03:29 +0200 |
---|---|---|
committer | Hans Dedecker <dedeckeh@gmail.com> | 2017-03-30 14:48:02 +0200 |
commit | 3d9f4067d56660a2c75ab2ce9b801ae1a4ff4cde (patch) | |
tree | d3a1a5e9dedd1d4d32dc375e2bb37dfbd21016d3 /src/odhcpd.h | |
parent | bc6c3ace738fd4eb28c06be533f6bbc75d0587a5 (diff) |
rework IPv6 dns address selection (FS#635)
Don't return anymore the link local IPv6 address as DNS IPv6 address
since different OS implementations (e.g. android, ...) cannot handle
a link local IPv6 address as DNS address.
IPv6 DNS address selection is reworked as follows :
-Consider all global/ULA IPv6 address having a valid lifetime
-Give preference to global/ULA IPv6 addresses being not deprecated
-Give preference to ULA IPv6 addresses over IPv6 global addresses
-Give preference to the IPv6 address with the longest preferred lifetime in
its selected category (ULA or global)
-If no global/ULA IPv6 address is present use the IPv6 link local address
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'src/odhcpd.h')
-rw-r--r-- | src/odhcpd.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/odhcpd.h b/src/odhcpd.h index 9733090..4ddadbe 100644 --- a/src/odhcpd.h +++ b/src/odhcpd.h @@ -203,7 +203,8 @@ ssize_t odhcpd_send(int socket, struct sockaddr_in6 *dest, const struct interface *iface); ssize_t odhcpd_get_interface_addresses(int ifindex, struct odhcpd_ipaddr *addrs, size_t cnt); -int odhcpd_get_linklocal_interface_address(int ifindex, struct in6_addr *lladdr); +int odhcpd_get_interface_dns_addr(const struct interface *iface, + struct in6_addr *addr); struct interface* odhcpd_get_interface_by_name(const char *name); int odhcpd_get_interface_config(const char *ifname, const char *what); int odhcpd_get_mac(const struct interface *iface, uint8_t mac[6]); |