]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
DHCP6: Only set RT to state with callbacks.
authorRoy Marples <roy@marples.name>
Wed, 8 Jan 2020 11:17:30 +0000 (11:17 +0000)
committerRoy Marples <roy@marples.name>
Wed, 8 Jan 2020 11:17:30 +0000 (11:17 +0000)
src/dhcp6.c

index 0d1b464a01ae3b3841d2634a8e9f943e41ff5f01..c1667303e3a3ee60a2a8b29345682f2337d5f300 100644 (file)
@@ -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);