]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
DHCP6: Restore lease timings
authorRoy Marples <roy@marples.name>
Wed, 1 Jul 2020 19:09:42 +0000 (20:09 +0100)
committerRoy Marples <roy@marples.name>
Wed, 1 Jul 2020 19:09:42 +0000 (20:09 +0100)
Erroneously changed in 060f5a9e93, only seems to affect
INFORM getting into a loop.

src/dhcp6.c

index da472b9db382510a0b96af198f0d56c0e64ad06b..2cf40793fc23f13f90c9ba692bcd8051dedd31aa 100644 (file)
@@ -3183,14 +3183,12 @@ dhcp6_bind(struct interface *ifp, const char *op, const char *sfrom)
                        state->state = DH6S_BOUND;
                state->failed = false;
 
-               if ((state->renew != 0 || state->rebind != 0) &&
-                   state->renew != ND6_INFINITE_LIFETIME)
+               if (state->renew && state->renew != ND6_INFINITE_LIFETIME)
                        eloop_timeout_add_sec(ifp->ctx->eloop,
                            state->renew,
                            state->state == DH6S_INFORMED ?
                            dhcp6_startinform : dhcp6_startrenew, ifp);
-               if ((state->rebind != 0 || state->expire != 0) &&
-                   state->rebind != ND6_INFINITE_LIFETIME)
+               if (state->rebind && state->rebind != ND6_INFINITE_LIFETIME)
                        eloop_timeout_add_sec(ifp->ctx->eloop,
                            state->rebind, dhcp6_startrebind, ifp);
                if (state->expire != ND6_INFINITE_LIFETIME)