mirror of
https://github.com/systemd/systemd.git
synced 2024-11-07 01:27:11 +03: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:
parent
8b1243f72e
commit
7bf2f43972
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user