Date: Fri, 20 Aug 1999 09:40:22 -0700 From: Tamiji Homma <thomma@baynetworks.com> To: freebsd-current@freebsd.org Subject: ping/egcs Message-ID: <19990820094022B.thomma@baynetworks.com>
next in thread | raw e-mail | index | archive | help
Hi, I just came across the problem with ping and egcs. If you do # ping -s 57 localhost PING localhost (127.0.0.1): 57 data bytes ^C --- localhost ping statistics --- 2 packets transmitted, 0 packets received, 100% packet loss if the data size is even number, it works OK. I think that the problem is that EGCS generates bad code in in_cksum() with -O. Compiling with -O0 solves the problem as well as applying following patch fixes it. I wonder if how many problems like this go unnoticed.... *** ping.c-org Fri Aug 20 09:38:33 1999 --- ping.c Fri Aug 20 09:39:08 1999 *************** *** 944,949 **** --- 944,950 ---- /* mop up an odd byte, if necessary */ if (nleft == 1) { *(u_char *)(&answer) = *(u_char *)w ; + *((u_char *)(&answer)+1) = 0; sum += answer; } Tammy To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990820094022B.thomma>