summaryrefslogtreecommitdiffstats
path: root/src/network/networkd-dhcp6.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2022-07-13 19:52:48 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2022-07-14 13:56:41 +0200
commit5235d739605f0f3f91abef9d5e7d8764ae57430c (patch)
treebcc21822a4052ddd9a87ac4ae483888ea621195b /src/network/networkd-dhcp6.c
parentnetwork: use sd_event_now() (diff)
downloadsystemd-5235d739605f0f3f91abef9d5e7d8764ae57430c.tar.xz
systemd-5235d739605f0f3f91abef9d5e7d8764ae57430c.zip
network: fix infinite lifetime handling
Diffstat (limited to 'src/network/networkd-dhcp6.c')
-rw-r--r--src/network/networkd-dhcp6.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/networkd-dhcp6.c b/src/network/networkd-dhcp6.c
index 3dc34f0e52..be7bdd6a43 100644
--- a/src/network/networkd-dhcp6.c
+++ b/src/network/networkd-dhcp6.c
@@ -266,8 +266,8 @@ static int dhcp6_address_acquired(Link *link) {
break;
r = dhcp6_request_address(link, &server_address, &ip6_addr,
- usec_add(lifetime_preferred_sec * USEC_PER_SEC, timestamp_usec),
- usec_add(lifetime_valid_sec * USEC_PER_SEC, timestamp_usec));
+ sec_to_usec(lifetime_preferred_sec, timestamp_usec),
+ sec_to_usec(lifetime_valid_sec, timestamp_usec));
if (r < 0)
return r;
}