Date: Thu, 24 Jun 2004 17:08:23 +0200 From: des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=) To: Joerg Wunsch <joerg_wunsch@interface-systems.de> Cc: sparc64@freebsd.org Subject: Re: Known 64-bit time_t issue with dhclient? Message-ID: <xzpr7s5ngd4.fsf@dwp.des.no> In-Reply-To: <20040624110043.A30818@ida.interface-business.de> (Joerg Wunsch's message of "Thu, 24 Jun 2004 11:00:43 %2B0200") References: <20040624110043.A30818@ida.interface-business.de>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
Joerg Wunsch <j@ida.interface-business.de> writes:
> bound to 193.101.57.69 -- renewal in 4673210995445900712 seconds.
> ^^^^^^^^^^^^^^^^^^^
isc-dhcp incorrectly assumes that time_t is an int32_t; see attached
patch for a workaround.
DES
--
Dag-Erling Smørgrav - des@des.no
[-- Attachment #2 --]
Index: contrib/isc-dhcp/common/parse.c
===================================================================
RCS file: /home/ncvs/src/contrib/isc-dhcp/common/parse.c,v
retrieving revision 1.1.1.8
diff -u -r1.1.1.8 parse.c
--- contrib/isc-dhcp/common/parse.c 2 Sep 2003 11:01:23 -0000 1.1.1.8
+++ contrib/isc-dhcp/common/parse.c 22 Feb 2004 10:44:52 -0000
@@ -414,6 +414,7 @@
{
const char *val;
enum dhcp_token token;
+ int32_t num;
token = next_token (&val, (unsigned *)0, cfile);
if (token != NUMBER) {
@@ -421,9 +422,9 @@
skip_to_semi (cfile);
return;
}
- convert_num (cfile, (unsigned char *)timep, val, 10, 32);
+ convert_num (cfile, (unsigned char *)&num, val, 10, 32);
/* Unswap the number - convert_num returns stuff in NBO. */
- *timep = ntohl (*timep); /* XXX */
+ *timep = ntohl (num);
parse_semi (cfile);
}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?xzpr7s5ngd4.fsf>
