Date: Sun, 22 Feb 2004 19:57:04 -0500 From: Garance A Drosihn <drosih@rpi.edu> To: des@des.no (Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= ) Cc: sparc64@freebsd.org Subject: Re: Problem with DHCLIENT vs 64-bit time_t Message-ID: <p0602046dbc5efd648caf@[128.113.24.47]> In-Reply-To: <xzpznbbwfxb.fsf@dwp.des.no> References: <p06020407bc533f0ae9d2@[128.113.24.47]> <20040215060047.GA62840@dhcp01.pn.xcllnt.net> <p0602040ebc54c885236b@[128.113.24.47]> <20040215165913.M30161@grogged.dyndns.org> <p06020425bc571c20bcde@[128.113.24.47]> <p06020466bc5e09bf7182@[128.113.24.47]> <xzpznbbwfxb.fsf@dwp.des.no>
next in thread | previous in thread | raw e-mail | index | archive | help
At 11:45 AM +0100 2/22/04, Dag-Erling Sm=F8rgrav wrote: >Garance A Drosihn <drosih@rpi.edu> writes: >> So, there definitely is something wrong with the dhclient from >> the base system But it might be that people having trouble with >> dhcp on 64-bTT sparc systems could use the port, at least for >> the short-term. > >Only takes a few minutes of eyeballing to figure out that the problem >is most likely on line 424 of src/contrib/isc-dhcp/common/parse.c: > > convert_num (cfile, (unsigned char *)timep, val, 10, 32); > >idiotically, the final argument to convert_num() is supposed to be >the size in bits of the number to store in the location pointed to >by the second argument. The simplest fix is to use a temporary >int32_t and assign it to *timep later, since convert_num() can't >deal with 64-bit quantities. See attached (untested) patch. Well, that definitely looks like a problem, but it may not be the only one. I tried applying your patch, recompiling, and installing. dhclient still seems to hang up on me. This was just a quick test, though, so I may have done something wrong. In a later message, Dag-Erling Sm=F8rgrav wrote: >Marcel Moolenaar <marcel@xcllnt.net> writes: >> This code is then obviously also broken on amd64 and ia64 [...] > >yep, if they have 64-bit time_t. They do, but they are also different-endian. Perhaps the bug is not as serious in that case. It could also be that the people able to spend money on amd64 and ia64 can also afford to have fixed IP addresses, and they don't run dhclient :-) [or maybe they are running the version from /usr/ports] -- Garance Alistair Drosehn =3D gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?p0602046dbc5efd648caf>