chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8b1243f
)
sd-dhcp-client: accept infinite lease lifetime
author
Tom Gundersen
<teg@jklm.no>
Wed, 19 Mar 2014 09:41:29 +0000
(10:41 +0100)
committer
Tom Gundersen
<teg@jklm.no>
Wed, 19 Mar 2014 09:41:29 +0000
(10:41 +0100)
Otherwise we would fail with -EINVAL. Thanks to Brandon Philips
<brandon.philips@coreos.com>, for reporting the bug.
src/libsystemd-network/sd-dhcp-client.c
patch
|
blob
|
history
diff --git
a/src/libsystemd-network/sd-dhcp-client.c
b/src/libsystemd-network/sd-dhcp-client.c
index 84111412d11128d7424c4743972b544bf86697a6..ce375dd0164b745856656a8343e1cea5287500e7 100644
(file)
--- 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;