dhcpv6-ia: fix invalid IPv6/hostname entries in statefile
authorHans Dedecker <dedeckeh@gmail.com>
Fri, 30 Dec 2016 19:52:05 +0000 (20:52 +0100)
committerHans Dedecker <dedeckeh@gmail.com>
Fri, 30 Dec 2016 20:17:28 +0000 (21:17 +0100)
commit541219e7795a5137c1cd32829064419e479ea4a7
treeef7d904de55ab2ac005d76ede2f7ad1291925d41
parent13937ab37916cd983cf89ab215cd9f7221633d8c
dhcpv6-ia: fix invalid IPv6/hostname entries in statefile

Statefull IPv6 addresses are assigned to DHCPv6 clients from a
local prefix based on criteria which need to be fulfilled.
One of those criteria requires the IPv6 address still having
preferred lifetime which was not checked when constructing
the contents of the statefile.
Another criteria requires the prefix length not being smaller
than or equal to 64 when ra_management equals 0 or 1 which was
neither correctly checked when constructing the statefile.
This can lead to invalid hostname/IPv6 entries in the statefile
and thus possible connectivity issues when using DNS resolving.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
src/dhcpv6-ia.c