dhcp6: fix accessor macro for t2

sd_dhcp6_lease_get_t2() was returning t1, and so sometimes the client
was going directly to the rebind state skipping the lease renewal.

See the systemd PR: https://github.com/systemd/systemd/pull/38275

Fixes: a14a033efb ('systemd: update code from upstream (2024-02-12)')
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2246
(cherry picked from commit 4938507de8)
This commit is contained in:
Beniamino Galvani 2025-07-22 10:09:50 +02:00
parent c3c7fda42d
commit 4e986fcbe3

View file

@ -114,7 +114,7 @@ static void dhcp6_lease_set_lifetime(sd_dhcp6_lease *lease) {
}
DEFINE_GET_TIME_FUNCTIONS(t1, lifetime_t1);
DEFINE_GET_TIME_FUNCTIONS(t2, lifetime_t1);
DEFINE_GET_TIME_FUNCTIONS(t2, lifetime_t2);
DEFINE_GET_TIME_FUNCTIONS(valid_lifetime, lifetime_valid);
static void dhcp6_lease_set_server_address(sd_dhcp6_lease *lease, const struct in6_addr *server_address) {