diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/libsystemd-network/sd-dhcp-client.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libsystemd-network/sd-dhcp-client.c b/src/libsystemd-network/sd-dhcp-client.c index 84111412d1..ce375dd016 100644 --- a/src/libsystemd-network/sd-dhcp-client.c +++ b/src/libsystemd-network/sd-dhcp-client.c @@ -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; |