From: Roy Marples Date: Sun, 2 Oct 2016 15:07:21 +0000 (+0000) Subject: If renew or rebind is not set, always use a default from the lowest pltime X-Git-Tag: v6.11.4~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a3b5d6d2bb1b8976e11d933433278f0042d0e792;p=thirdparty%2Fdhcpcd.git If renew or rebind is not set, always use a default from the lowest pltime even if the lease does not expire, as some IA/PD might expire. Thanks to Guy Yur. --- diff --git a/dhcp6.c b/dhcp6.c index 6846f414..1042939e 100644 --- a/dhcp6.c +++ b/dhcp6.c @@ -3130,18 +3130,10 @@ dhcp6_handledata(void *arg) state->renew = state->rebind = 0; } } - if (state->renew == 0) { - if (state->expire == ND6_INFINITE_LIFETIME) - state->renew = ND6_INFINITE_LIFETIME; - else if (state->lowpl != ND6_INFINITE_LIFETIME) - state->renew = (uint32_t)(state->lowpl * 0.5); - } - if (state->rebind == 0) { - if (state->expire == ND6_INFINITE_LIFETIME) - state->rebind = ND6_INFINITE_LIFETIME; - else if (state->lowpl != ND6_INFINITE_LIFETIME) - state->rebind = (uint32_t)(state->lowpl * 0.8); - } + if (state->renew == 0 && state->lowpl != ND6_INFINITE_LIFETIME) + state->renew = (uint32_t)(state->lowpl * 0.5); + if (state->rebind == 0 && state->lowpl != ND6_INFINITE_LIFETIME) + state->rebind = (uint32_t)(state->lowpl * 0.8); break; default: state->reason = "UNKNOWN6";