Date: Fri, 12 Nov 1999 13:20:01 -0800 (PST) From: "Marinos J. Yannikos" <mjy@pobox.com> To: freebsd-bugs@FreeBSD.org Subject: Re: misc/14850: dhclient crashes (communicating with bootpd) Message-ID: <199911122120.NAA12271@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR misc/14850; it has been noted by GNATS. From: "Marinos J. Yannikos" <mjy@pobox.com> To: freebsd-gnats-submit@freebsd.org, mjy@pobox.com Cc: Subject: Re: misc/14850: dhclient crashes (communicating with bootpd) Date: Fri, 12 Nov 1999 22:19:04 +0100 FIX: Change the following in /usr/src/contrib/isc-dhcp/client/dhclient.c It should not affect anything else; it only adds an additional check for the case where there is no lease time. ----------------------------------- cut here ------------------------------- *** dhclient.c Fri Nov 12 22:22:57 1999 --- /tmp/dhclient.c Fri Nov 12 21:40:27 1999 *************** *** 526,534 **** cancel_timeout (send_request, ip); /* Figure out the lease time. */ ! ip -> client -> new -> expiry = getULong (ip -> client -> new -> options [DHO_DHCP_LEASE_TIME].data); /* A number that looks negative here is really just very large, because the lease expiry offset is unsigned. */ if (ip -> client -> new -> expiry < 0) --- 526,538 ---- cancel_timeout (send_request, ip); /* Figure out the lease time. */ ! if (ip -> client -> new -> options [DHO_DHCP_LEASE_TIME].len > 0) ! { ! ip -> client -> new -> expiry = getULong (ip -> client -> new -> options [DHO_DHCP_LEASE_TIME].data); + } + else ip -> client -> new -> expiry = TIME_MAX; /* A number that looks negative here is really just very large, because the lease expiry offset is unsigned. */ if (ip -> client -> new -> expiry < 0) ----------------------------------- cut here ------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199911122120.NAA12271>