From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,f8e2499b82321922 X-Google-Attributes: gid111c93,public From: Alex Rhomberg Subject: Re: Funky PING messages Date: 1999/08/17 Message-ID: <37B925E5.897EA6AC@ife.ee.ethz.ch>#1/1 X-Deja-AN: 513722020 Content-Transfer-Encoding: 7bit References: <37b8b17d.117504172@pubnews.demon.co.uk> <37B81C9E.BD2E7D09@iol.unh.edu> To: Xiaozhou Qiu Content-Type: text/plain; charset=us-ascii X-Trace: 17 Aug 1999 11:05:40 +0100, beethoven.ee.ethz.ch Organization: Electronics Lab, ETH Zurich, Switzerland MIME-Version: 1.0 Newsgroups: comp.os.linux.alpha Xiaozhou Qiu wrote: > > It is a very small bug in ping for Alpha. It assumes the size of struct > timeval as 8, while it is 16 in Alpha. I just revised it several days > ago. If interested, please come to the following site to get the updated > source code and binary and try it. > ftp://mars.iol.unh.edu/pub/linux/applications/ > > Xiaozhou Qiu Dear Mister Qiu Please note that your fix for ping introduces new bugs and leaves old ones intact: You exchanged 8 for 16 which is as evil as using 8 instead of sizeof(struct timeval) in the first place (line 711) In line 596, you exchanged "datalen + 8" with "datalen + sizeof(struct timeval)", even though the 8 is the size of the ICMP portion and NOT a timeval In line 665, the tvsub() call should still give an unaligned trap error The new redhat rpm removes some but not all bug. The fix that removes all bugs related to timeval I know of was contributed to by (IIRC) Helmut Katzengraber and myself and can be found at http://www.ife.ee.ethz.ch/~rhomberg/files/ping.c It is based on netkit 0.11 while redhat ships netkit 0.10 Regards Alex