[systemd-commits] src/libsystemd-network
Tom Gundersen
tomegun at kemper.freedesktop.org
Wed Mar 19 02:53:38 PDT 2014
src/libsystemd-network/sd-dhcp-client.c | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit 7bf2f4397255bc8f6cf20a0f2adab4c984ea7d14
Author: Tom Gundersen <teg at jklm.no>
Date: Wed Mar 19 10:41:29 2014 +0100
sd-dhcp-client: accept infinite lease lifetime
Otherwise we would fail with -EINVAL. Thanks to Brandon Philips
<brandon.philips at coreos.com>, for reporting the bug.
diff --git a/src/libsystemd-network/sd-dhcp-client.c b/src/libsystemd-network/sd-dhcp-client.c
index 8411141..ce375dd 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;
More information about the systemd-commits
mailing list