summaryrefslogtreecommitdiffhomepage
path: root/src/odhcpd.h
diff options
context:
space:
mode:
authorHans Dedecker <dedeckeh@gmail.com>2014-10-30 12:30:32 +0100
committerHans Dedecker <dedeckeh@gmail.com>2014-10-30 14:05:41 +0100
commitd94b406eeba27af2a6abff333dc16e82d28ed636 (patch)
tree5590f9d3345e51c1c8f6c881da30896fdc2b29fc /src/odhcpd.h
parentb461334ab277b6e8fd1622ab7c8a655363bd3f6c (diff)
Fix IPv6 DNS server adddress selection
Fix selection of IPv6 DNS address in DHCPv6 and RA overwrite as an address could be selected with preferred lifetime zero while IPv6 addresses are in use with non zero preferred lifetimes. Fix tries to pick the IPv6 address with the longest preferred lifetime now. Fixes also the issue an IPv6 address with preferred lifetime zero could be returned in DHCPv6 DNS server option while an IPv6 address with non zero preferred lifetime is returned as DNS recursive RA option for the same set of available IPv6 addresses.
Diffstat (limited to 'src/odhcpd.h')
-rw-r--r--src/odhcpd.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/odhcpd.h b/src/odhcpd.h
index c0e509d..bc837d5 100644
--- a/src/odhcpd.h
+++ b/src/odhcpd.h
@@ -186,6 +186,7 @@ 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_preferred_interface_address(int ifindex, struct in6_addr *addr);
struct interface* odhcpd_get_interface_by_name(const char *name);
int odhcpd_get_interface_mtu(const char *ifname);
int odhcpd_get_mac(const struct interface *iface, uint8_t mac[6]);