From owner-freebsd-bugs Fri Nov 12 13:20: 4 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id A76EB14CFA for ; Fri, 12 Nov 1999 13:20:02 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id NAA12271; Fri, 12 Nov 1999 13:20:01 -0800 (PST) (envelope-from gnats@FreeBSD.org) Date: Fri, 12 Nov 1999 13:20:01 -0800 (PST) Message-Id: <199911122120.NAA12271@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: "Marinos J. Yannikos" Subject: Re: misc/14850: dhclient crashes (communicating with bootpd) Reply-To: "Marinos J. Yannikos" Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR misc/14850; it has been noted by GNATS. From: "Marinos J. Yannikos" 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