Skip to contentSkip to conversation

dhcp: Make sure lease bound_time is in BOOTTIME

PATCH New Denis Kenzior 1 participant 1 message May 13, 2022

lore
Share & tools
lore

Denis Kenzior

author
#0 lore raw

PATCH 1/1 dhcp: Make sure lease bound_time is in BOOTTIME

The timestamp obtained from the kernel is always in CLOCK_REALTIME, not CLOCK_BOOTTIME. For bound_time, we expected CLOCK_BOOTTIME.

Fixes c78ad1bb6d7e ("dhcp: Set lease expiry based on frame reception times")
---
 ell/dhcp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
ell/dhcp.c +1 -1
index 01900f3b1d38..8418825c6c81 100644
@@ -922,7 +922,7 @@ static void dhcp_client_rx_message(const void *data, size_t len, void *userdata,
 
 		dhcp_client_event_notify(client, r);
 
-		client->lease->bound_time = timestamp;
+		client->lease->bound_time = l_time_now();
 
 		/*
 		 * Start T1, once it expires we will start the T2 timer.  If
Signature · 1 line
2.32.0