mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-10 08:10:22 +01:00
RHEL7 supports clock_gettime(CLOCK_BOOTIME), but it does not support
timerfd_create(CLOCK_BOOTIME). Creating a timerfd will fail with EINVAL.
Fallback to CLOCK_MONOTONIC.
Compare this to n-acd which also has compatibility code to fallback to
CLOCK_MONOTONIC. However when n-acd falls back to CLOCK_MONOTONIC, it uses
monotonic clock also for clock_gettime().
For n-dhcp4, the timestamps are also exposed in the public API
(n_dhcp4_client_lease_get_lifetime()). Hence, for timestamps n-dhcp4
still uses and requires clock_gettime(CLOCK_BOOTIME). Only the internal
timeout handling with the timerfd falls back to CLOCK_MONOTONIC.
https://github.com/nettools/n-dhcp4/pull/13
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/362
(cherry picked from commit
|
||
|---|---|---|
| .. | ||
| util | ||
| libndhcp4.sym | ||
| meson.build | ||
| n-dhcp4-c-connection.c | ||
| n-dhcp4-c-lease.c | ||
| n-dhcp4-c-probe.c | ||
| n-dhcp4-client.c | ||
| n-dhcp4-incoming.c | ||
| n-dhcp4-outgoing.c | ||
| n-dhcp4-private.h | ||
| n-dhcp4-s-connection.c | ||
| n-dhcp4-s-lease.c | ||
| n-dhcp4-server.c | ||
| n-dhcp4-socket.c | ||
| n-dhcp4.h | ||
| test-api.c | ||
| test-connection.c | ||
| test-message.c | ||
| test-run-client.c | ||
| test-socket.c | ||
| test.h | ||