From: Denis Kenzior <denkenz at gmail.com>
To: ell at lists.01.org
Subject: [PATCH] dhcp: Make sure lease bound_time is in BOOTTIME
Date: Fri, 13 May 2022 11:29:24 -0500 [thread overview]
Message-ID: <20220513162924.27587-1-denkenz@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 732 bytes --]
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(-)
diff --git a/ell/dhcp.c b/ell/dhcp.c
index 01900f3b1d38..8418825c6c81 100644
--- a/ell/dhcp.c
+++ b/ell/dhcp.c
@@ -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
--
2.32.0
reply other threads:[~2022-05-13 16:29 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220513162924.27587-1-denkenz@gmail.com \
--to=ell@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).