Preferred lifetime cannot be greater than the valid lifetime of an IA;
fix this by checking if the preferred lifetime does not exceed the
valid lifetime of an IA
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
if (prefix_valid > leasetime)
prefix_valid = leasetime;
+ if (prefix_pref > prefix_valid)
+ prefix_pref = prefix_valid;
+
if (a->flags & OAF_DHCPV6_PD) {
struct dhcpv6_ia_prefix o_ia_p = {
.type = htons(DHCPV6_OPT_IA_PREFIX),