NetworkManager/shared/n-dhcp4/src
Thomas Haller f49ce41214 client: fallback to CLOCK_MONOTONIC for timerfd
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 a1771c738d)
2019-12-15 13:51:44 +01:00
..
util n-dhcp4: util/link: suppress gcc warning 2019-11-20 10:42:57 +01:00
libndhcp4.sym n-dhcp4/lease: expose the server IP address 2019-11-18 13:34:09 +01:00
meson.build Merge commit 'e23b3c9c3ac86b065eef002fa5c4321cc4a87df2' as 'shared/n-dhcp4' 2019-05-25 02:02:04 +02:00
n-dhcp4-c-connection.c n-dhcp4: log outgoing packets 2019-11-22 10:24:49 +01:00
n-dhcp4-c-lease.c lease: add n_dhcp4_client_lease_get_basetime() 2019-11-20 10:58:51 +01:00
n-dhcp4-c-probe.c n-dhcp4: fix state transitions on timer dispatch 2019-11-20 15:14:35 +01:00
n-dhcp4-client.c client: fallback to CLOCK_MONOTONIC for timerfd 2019-12-15 13:51:44 +01:00
n-dhcp4-incoming.c incoming: don't handle 0xFFFFFFFF timestamps special in n_dhcp4_incoming_query_u32() 2019-11-20 10:58:51 +01:00
n-dhcp4-outgoing.c n-dhcp4: avoid "-Werror=declaration-after-statement" warning with static_assert 2019-08-02 11:48:35 +02:00
n-dhcp4-private.h client: fallback to CLOCK_MONOTONIC for timerfd 2019-12-15 13:51:44 +01:00
n-dhcp4-s-connection.c Merge commit 'e23b3c9c3ac86b065eef002fa5c4321cc4a87df2' as 'shared/n-dhcp4' 2019-05-25 02:02:04 +02:00
n-dhcp4-s-lease.c Merge commit 'e23b3c9c3ac86b065eef002fa5c4321cc4a87df2' as 'shared/n-dhcp4' 2019-05-25 02:02:04 +02:00
n-dhcp4-server.c Merge commit 'e23b3c9c3ac86b065eef002fa5c4321cc4a87df2' as 'shared/n-dhcp4' 2019-05-25 02:02:04 +02:00
n-dhcp4-socket.c n-dhcp4/socket: use SO_REUSEADDR on UDP socket 2019-12-11 09:25:05 +01:00
n-dhcp4.h n-dhcp4: add logging API 2019-11-22 10:24:49 +01:00
test-api.c n-dhcp4/lease: expose the server IP address 2019-11-18 13:34:09 +01:00
test-connection.c Merge commit 'e23b3c9c3ac86b065eef002fa5c4321cc4a87df2' as 'shared/n-dhcp4' 2019-05-25 02:02:04 +02:00
test-message.c Merge commit 'e23b3c9c3ac86b065eef002fa5c4321cc4a87df2' as 'shared/n-dhcp4' 2019-05-25 02:02:04 +02:00
test-run-client.c Merge commit 'e23b3c9c3ac86b065eef002fa5c4321cc4a87df2' as 'shared/n-dhcp4' 2019-05-25 02:02:04 +02:00
test-socket.c Merge commit 'e23b3c9c3ac86b065eef002fa5c4321cc4a87df2' as 'shared/n-dhcp4' 2019-05-25 02:02:04 +02:00
test.h Merge commit 'e23b3c9c3ac86b065eef002fa5c4321cc4a87df2' as 'shared/n-dhcp4' 2019-05-25 02:02:04 +02:00