From: Roy Marples Date: Wed, 8 Jan 2020 11:17:30 +0000 (+0000) Subject: DHCP6: Only set RT to state with callbacks. X-Git-Tag: v9.0.0~137 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2eae85a8f4cfecdec18ae015f5d47ab4be056b78;p=thirdparty%2Fdhcpcd.git DHCP6: Only set RT to state with callbacks. --- diff --git a/src/dhcp6.c b/src/dhcp6.c index 0d1b464a..c1667303 100644 --- a/src/dhcp6.c +++ b/src/dhcp6.c @@ -1341,11 +1341,11 @@ dhcp6_sendmessage(struct interface *ifp, void (*callback)(void *)) #ifdef PRIVSEP sent: #endif - state->RT = RT * 2; - if (state->RT < RT) /* Check overflow */ - state->RT = RT; state->RTC++; if (callback) { + state->RT = RT * 2; + if (state->RT < RT) /* Check overflow */ + state->RT = RT; if (state->MRC == 0 || state->RTC < state->MRC) eloop_timeout_add_msec(ctx->eloop, RT, callback, ifp);