summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2023-09-20 11:43:26 +0200
committerGitHub <noreply@github.com>2023-09-20 11:43:26 +0200
commit0d05d1623e1e6c2a26bf7ea8f3eddb8891921d6f (patch)
tree355bd10c88fe03b74e728af428133d9899d50c58 /src/network
parentMerge pull request #29179 from YHNdnzj/resume-offset-btrfs (diff)
parentsd-dhcp-server: store lifetime and friends in usec_t (diff)
downloadsystemd-0d05d1623e1e6c2a26bf7ea8f3eddb8891921d6f.tar.xz
systemd-0d05d1623e1e6c2a26bf7ea8f3eddb8891921d6f.zip
Merge pull request #29092 from yuwata/sd-dhcp-server-use-usec
sd-dhcp-server: store lifetime and friends in usec_t
Diffstat (limited to 'src/network')
-rw-r--r--src/network/networkd-dhcp-server.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/network/networkd-dhcp-server.c b/src/network/networkd-dhcp-server.c
index 0857311d5e..dacbb7e129 100644
--- a/src/network/networkd-dhcp-server.c
+++ b/src/network/networkd-dhcp-server.c
@@ -391,15 +391,13 @@ static int dhcp4_server_configure(Link *link) {
return log_link_error_errno(link, r, "Failed to configure address pool for DHCPv4 server instance: %m");
if (link->network->dhcp_server_max_lease_time_usec > 0) {
- r = sd_dhcp_server_set_max_lease_time(link->dhcp_server,
- DIV_ROUND_UP(link->network->dhcp_server_max_lease_time_usec, USEC_PER_SEC));
+ r = sd_dhcp_server_set_max_lease_time(link->dhcp_server, link->network->dhcp_server_max_lease_time_usec);
if (r < 0)
return log_link_error_errno(link, r, "Failed to set maximum lease time for DHCPv4 server instance: %m");
}
if (link->network->dhcp_server_default_lease_time_usec > 0) {
- r = sd_dhcp_server_set_default_lease_time(link->dhcp_server,
- DIV_ROUND_UP(link->network->dhcp_server_default_lease_time_usec, USEC_PER_SEC));
+ r = sd_dhcp_server_set_default_lease_time(link->dhcp_server, link->network->dhcp_server_default_lease_time_usec);
if (r < 0)
return log_link_error_errno(link, r, "Failed to set default lease time for DHCPv4 server instance: %m");
}