diff options
author | Lennart Poettering <lennart@poettering.net> | 2022-03-28 16:41:10 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2022-03-28 16:55:41 +0200 |
commit | ba4e0427e955a648e24f6506d0cb92857c84b85d (patch) | |
tree | 78d563c6d8b36fab7b7d53997d5a27f55cad10d6 /src/libsystemd-network/sd-ndisc.c | |
parent | ec4954d934c67c315669eff5593a68fd402a63e8 (diff) | |
download | systemd-ba4e0427e955a648e24f6506d0cb92857c84b85d.tar.gz |
time-util: assume CLOCK_BOOTTIME always exists
Let's raise our supported baseline a bit: CLOCK_BOOTTIME started to work
with timerfd in kernel 3.15 (i.e. back in 2014), let's require support
for it now.
This will raise our baseline only modestly from 3.13 → 3.15.
Diffstat (limited to 'src/libsystemd-network/sd-ndisc.c')
-rw-r--r-- | src/libsystemd-network/sd-ndisc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libsystemd-network/sd-ndisc.c b/src/libsystemd-network/sd-ndisc.c index 7e16f51299..ecd552ca0c 100644 --- a/src/libsystemd-network/sd-ndisc.c +++ b/src/libsystemd-network/sd-ndisc.c @@ -269,7 +269,7 @@ static int ndisc_timeout(sd_event_source *s, uint64_t usec, void *userdata) { assert(nd); assert(nd->event); - assert_se(sd_event_now(nd->event, clock_boottime_or_monotonic(), &time_now) >= 0); + assert_se(sd_event_now(nd->event, CLOCK_BOOTTIME, &time_now) >= 0); if (!nd->retransmit_time) nd->retransmit_time = ndisc_timeout_compute_random(NDISC_ROUTER_SOLICITATION_INTERVAL); @@ -281,7 +281,7 @@ static int ndisc_timeout(sd_event_source *s, uint64_t usec, void *userdata) { } r = event_reset_time(nd->event, &nd->timeout_event_source, - clock_boottime_or_monotonic(), + CLOCK_BOOTTIME, time_now + nd->retransmit_time, 10 * USEC_PER_MSEC, ndisc_timeout, nd, nd->event_priority, "ndisc-timeout-no-ra", true); @@ -344,7 +344,7 @@ int sd_ndisc_start(sd_ndisc *nd) { assert(!nd->recv_event_source); - r = sd_event_now(nd->event, clock_boottime_or_monotonic(), &time_now); + r = sd_event_now(nd->event, CLOCK_BOOTTIME, &time_now); if (r < 0) goto fail; @@ -363,7 +363,7 @@ int sd_ndisc_start(sd_ndisc *nd) { (void) sd_event_source_set_description(nd->recv_event_source, "ndisc-receive-message"); r = event_reset_time(nd->event, &nd->timeout_event_source, - clock_boottime_or_monotonic(), + CLOCK_BOOTTIME, time_now + USEC_PER_SEC / 2, 1 * USEC_PER_SEC, /* See RFC 8415 sec. 18.2.1 */ ndisc_timeout, nd, nd->event_priority, "ndisc-timeout", true); @@ -371,7 +371,7 @@ int sd_ndisc_start(sd_ndisc *nd) { goto fail; r = event_reset_time(nd->event, &nd->timeout_no_ra, - clock_boottime_or_monotonic(), + CLOCK_BOOTTIME, time_now + NDISC_TIMEOUT_NO_RA_USEC, 10 * USEC_PER_MSEC, ndisc_timeout_no_ra, nd, nd->event_priority, "ndisc-timeout-no-ra", true); |