diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/dhcpv6-ia.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/dhcpv6-ia.c b/src/dhcpv6-ia.c index b51649c..38a901b 100644 --- a/src/dhcpv6-ia.c +++ b/src/dhcpv6-ia.c @@ -247,9 +247,15 @@ void dhcpv6_ia_enum_addrs(struct interface *iface, struct dhcp_assignment *c, addr.s6_addr32[2] = addr.s6_addr32[3] = 0; } + if (pref > (uint32_t)c->valid_until) + pref = c->valid_until; + if (pref != UINT32_MAX) pref -= now; + if (valid > (uint32_t)c->valid_until) + valid = c->valid_until; + if (valid != UINT32_MAX) valid -= now; |