mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
sd-dhcp-client: accept infinite lease lifetime
Otherwise we would fail with -EINVAL. Thanks to Brandon Philips <brandon.philips@coreos.com>, for reporting the bug.
This commit is contained in:
@@ -747,6 +747,10 @@ static int client_set_lease_timeouts(sd_dhcp_client *client, uint64_t usec) {
|
||||
assert(client);
|
||||
assert(client->event);
|
||||
|
||||
/* don't set timers for infinite leases */
|
||||
if (client->lease->lifetime == 0xffffffff)
|
||||
return 0;
|
||||
|
||||
if (client->lease->lifetime < 10)
|
||||
return -EINVAL;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user