From owner-freebsd-current Fri Aug 20 9:43:25 1999 Delivered-To: freebsd-current@freebsd.org Received: from southpass.baynetworks.com (ns2.BayNetworks.COM [134.177.3.16]) by hub.freebsd.org (Postfix) with ESMTP id 8201114C01 for ; Fri, 20 Aug 1999 09:43:23 -0700 (PDT) (envelope-from thomma@BayNetworks.COM) Received: from mailhost.BayNetworks.COM (h016b.s86b1.BayNetworks.COM [134.177.1.107]) by southpass.baynetworks.com (8.9.1/8.9.1) with ESMTP id JAA14008 for ; Fri, 20 Aug 1999 09:38:43 -0700 (PDT) Received: from fedex.engwest.baynetworks.com (fedex.engwest.baynetworks.com [134.177.110.46]) by mailhost.BayNetworks.COM (8.9.1/8.8.8) with SMTP id JAA12834 for ; Fri, 20 Aug 1999 09:42:18 -0700 (PDT) Received: from carrera.engwest (carrera.engwest.baynetworks.com) by fedex.engwest.baynetworks.com (4.1/SMI-4.1) Received: from localhost by carrera.engwest (SMI-8.6/SMI-SVR4) id JAA02166; Fri, 20 Aug 1999 09:40:23 -0700 To: freebsd-current@freebsd.org Subject: ping/egcs X-Mailer: Mew version 1.92 on Emacs 19.28 / Mule 2.3 (SUETSUMUHANA) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <19990820094022B.thomma@baynetworks.com> Date: Fri, 20 Aug 1999 09:40:22 -0700 From: Tamiji Homma X-Dispatcher: imput version 971024 Lines: 32 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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