diff options
Diffstat (limited to 'src/dhcpv6-ia.c')
-rw-r--r-- | src/dhcpv6-ia.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/dhcpv6-ia.c b/src/dhcpv6-ia.c index 84f368e..888634f 100644 --- a/src/dhcpv6-ia.c +++ b/src/dhcpv6-ia.c @@ -88,8 +88,7 @@ int setup_dhcpv6_ia_interface(struct interface *iface, bool enable) return -1; } - if (lease->dhcpv4_leasetime > 0) - a->leasetime = lease->dhcpv4_leasetime; + a->leasetime = lease->dhcpv4_leasetime; a->clid_len = duid_len; a->length = 128; @@ -719,16 +718,11 @@ static size_t append_reply(uint8_t *buf, size_t buflen, uint16_t status, } else { if (a) { uint32_t leasetime; - if (a->leasetime > 0) + if (a->leasetime) leasetime = a->leasetime; else leasetime = iface->dhcpv4_leasetime; - if (leasetime == 0) - leasetime = 3600; - else if (leasetime < 60) - leasetime = 60; - uint32_t pref = leasetime; uint32_t valid = leasetime; |