From: Roy Marples Date: Fri, 21 Feb 2025 09:47:25 +0000 (+0000) Subject: DHCP6: RENEW/REBIND if T1/T2 have passed at CONFIRM X-Git-Tag: v10.2.1~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ef74ffdaff7638381cf79d24d0ffc5977aeecd79;p=thirdparty%2Fdhcpcd.git DHCP6: RENEW/REBIND if T1/T2 have passed at CONFIRM --- diff --git a/src/dhcp6.c b/src/dhcp6.c index 3355cd94..7d0d318a 100644 --- a/src/dhcp6.c +++ b/src/dhcp6.c @@ -3349,12 +3349,16 @@ dhcp6_bind(struct interface *ifp, const char *op, const char *sfrom) state->state = DH6S_BOUND; state->failed = false; - if (state->renew && state->renew != ND6_INFINITE_LIFETIME) + /* If we CONFIRM we might need to enter RENEW + * or REBIND right away if the timers have expired */ + if ((state->renew || (state->rebind && confirmed)) && + 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 && state->rebind != ND6_INFINITE_LIFETIME) + if ((state->rebind || (state->expire && confirmed)) && + state->rebind != ND6_INFINITE_LIFETIME) eloop_timeout_add_sec(ifp->ctx->eloop, state->rebind, dhcp6_startrebind, ifp); if (state->expire != ND6_INFINITE_LIFETIME)