summaryrefslogtreecommitdiffstats
path: root/dhcp.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-11-19 14:58:17 +0000
committerRoy Marples <roy@marples.name>2008-11-19 14:58:17 +0000
commitea7071e5c997b255ae3f356ab7ebd14e89f1ecc9 (patch)
treefc3cd08b965934e57028fa0bc06f192e87b875a9 /dhcp.c
parent991e95061860340023e5ed6e2f738d9ec9ae9414 (diff)
downloaddhcpcd-ea7071e5c997b255ae3f356ab7ebd14e89f1ecc9.tar.xz
If no lease time is supplied, assume it's infinite.
Diffstat (limited to 'dhcp.c')
-rw-r--r--dhcp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dhcp.c b/dhcp.c
index 7c8d7aa1..8a861f23 100644
--- a/dhcp.c
+++ b/dhcp.c
@@ -1286,7 +1286,7 @@ get_lease(struct dhcp_lease *lease, const struct dhcp_message *dhcp)
if (now.tv_sec + (time_t)lease->leasetime < now.tv_sec)
lease->leasetime = ~0U; /* Infinite lease */
} else
- lease->leasetime = DEFAULT_LEASETIME;
+ lease->leasetime = ~0U; /* Default to infinite lease */
if (get_option_uint32(&lease->renewaltime, dhcp, DHO_RENEWALTIME) != 0)
lease->renewaltime = 0;
if (get_option_uint32(&lease->rebindtime, dhcp, DHO_REBINDTIME) != 0)