sd-dhcp6-lease: fix calculation of t2

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

Reported-by: Jaime Caamano <jcaamano@redhat.com>
Fixes: 394fac52d0 ("sd-dhcp6-client: introduce sd_dhcp6_lease_get_t1() and friends")
This commit is contained in:
Beniamino Galvani
2025-07-21 14:24:27 +02:00
committed by Yu Watanabe
parent 7107cfbf4f
commit 8f5eaeb143

View File

@@ -115,7 +115,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) {