Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 0546855d7431d3fdfce69d4cced3d294 > files > 30

dhcp-3.0.5-31.el5.src.rpm

diff -up dhcp-3.0.5/client/dhclient.c.short-lease dhcp-3.0.5/client/dhclient.c
--- dhcp-3.0.5/client/dhclient.c.short-lease	2010-01-26 11:35:02.000000000 +0100
+++ dhcp-3.0.5/client/dhclient.c	2010-01-26 11:43:30.000000000 +0100
@@ -1396,6 +1396,9 @@ void dhcpack (packet)
 	   because the lease expiry offset is unsigned. */
 	if (client -> new -> expiry < 0)
 		client -> new -> expiry = TIME_MAX;
+        /* Don't go crazy with a 'max-lease-time 2' or so. */
+	if (client -> new -> expiry < 60)
+		client -> new->expiry = 60;
 	/* Take the server-provided renewal time if there is one. */
 	oc = lookup_option (&dhcp_universe, client -> new -> options,
 			    DHO_DHCP_RENEWAL_TIME);