changeset 4942:fc102732fa9c draft

DHCP6: Only set RT to state with callbacks.
author Roy Marples <roy@marples.name>
date Wed, 08 Jan 2020 11:17:30 +0000
parents 384a97a92e86
children 7dc0c3a4080f
files src/dhcp6.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/dhcp6.c	Wed Jan 08 00:43:11 2020 +0000
+++ b/src/dhcp6.c	Wed Jan 08 11:17:30 2020 +0000
@@ -1341,11 +1341,11 @@
 #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);