From owner-freebsd-hackers Mon Nov 1 18:31:40 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from mail-out1.apple.com (mail-out1.apple.com [17.254.0.52]) by hub.freebsd.org (Postfix) with ESMTP id A314D14BD4 for ; Mon, 1 Nov 1999 18:31:24 -0800 (PST) (envelope-from justin@rhapture.apple.com) Received: from mailgate2.apple.com ([17.129.100.225]) by mail-out1.apple.com (8.9.3/8.9.3) with ESMTP id SAA15418 for ; Mon, 1 Nov 1999 18:31:21 -0800 (PST) Received: from scv1.apple.com (scv1.apple.com) by mailgate2.apple.com (Content Technologies SMTPRS 2.0.15) with ESMTP id ; Mon, 01 Nov 1999 18:31:13 -0800 Received: from rhapture.apple.com (rhapture.apple.com [17.202.40.59]) by scv1.apple.com (8.9.3/8.9.3) with ESMTP id SAA25166; Mon, 1 Nov 1999 18:31:12 -0800 (PST) Received: (from justin@localhost) by rhapture.apple.com (8.9.1/8.9.1) id SAA01118; Mon, 1 Nov 1999 18:31:12 -0800 (PST) Message-Id: <199911020231.SAA01118@rhapture.apple.com> To: hackers@freebsd.org Subject: Re: Ping - sized tests with 0% and 100% packet loss! Any ideas? Cc: joe@pavilion.net Date: Mon, 1 Nov 1999 18:31:11 -0800 From: "Justin C. Walker" Reply-To: justin@apple.com X-Mailer: by Apple MailViewer (2.105.dev) Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > From: Peter Jeremy > Date: 1999-11-01 17:49:29 -0800 > To: hackers@FreeBSD.ORG > Subject: Re: Ping - sized tests with 0% and 100% packet loss! Any ideas? > Cc: joe@pavilion.net > X-Mailer: Mutt 1.0pre3i > Content-return: prohibited > Delivered-to: freebsd-hackers@freebsd.org > X-Loop: FreeBSD.ORG > > At Tue, 2 Nov 1999 00:16:02 +0000, Josef Karthauser wrote: > >Anyone any idea what's going on? > > The problem doesn't exist in 2.2.5-RELEASE. I can't readily test > anything other than that and -current at present. FWIW, our kernel, based roughly on FreeBSD 3.2, has the same line as marked with "-", and I don't see the problem: # for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 > do > echo === $i === > ping -f -c 300 -s $i localhost > done| grep loss 300 packets transmitted, 300 packets received, 0% packet loss 300 packets transmitted, 300 packets received, 0% packet loss 300 packets transmitted, 300 packets received, 0% packet loss 300 packets transmitted, 300 packets received, 0% packet loss 300 packets transmitted, 300 packets received, 0% packet loss 300 packets transmitted, 300 packets received, 0% packet loss 300 packets transmitted, 300 packets received, 0% packet loss 300 packets transmitted, 300 packets received, 0% packet loss 300 packets transmitted, 300 packets received, 0% packet loss 300 packets transmitted, 300 packets received, 0% packet loss 300 packets transmitted, 300 packets received, 0% packet loss 300 packets transmitted, 300 packets received, 0% packet loss 300 packets transmitted, 300 packets received, 0% packet loss 300 packets transmitted, 300 packets received, 0% packet loss 300 packets transmitted, 300 packets received, 0% packet loss 300 packets transmitted, 300 packets received, 0% packet loss 300 packets transmitted, 300 packets received, 0% packet loss 300 packets transmitted, 300 packets received, 0% packet loss 300 packets transmitted, 300 packets received, 0% packet loss 300 packets transmitted, 300 packets received, 0% packet loss Regards, Justin > As far as I can determine, the problem with 1-byte packets is that > the transmitted checksum is incorrect when the ICMP sequence number > exceeds 255 - this suggests that the checksum missing the last byte > of the sequence number. The problem is also on the transmit side. > > Studying the code in src/sys/netinet/ip_icmp.c:icmp_input() [which > is reporting checksum errors] and icmp_send() [which inserts the > checksum], it looks to me like the problem is: > > cvs diff: Diffing . > Index: ip_icmp.c > =================================================================== > RCS file: /home/CVSROOT/src/sys/netinet/ip_icmp.c,v > retrieving revision 1.37 > diff -u -r1.37 ip_icmp.c > --- ip_icmp.c 1999/09/14 16:40:28 1.37 > +++ ip_icmp.c 1999/11/02 01:45:34 > @@ -685,7 +685,7 @@ > m->m_len -= hlen; > icp = mtod(m, struct icmp *); > icp->icmp_cksum = 0; > - icp->icmp_cksum = in_cksum(m, ip->ip_len - hlen); > + icp->icmp_cksum = in_cksum(m, ip->ip_len); > m->m_data -= hlen; > m->m_len += hlen; > m->m_pkthdr.rcvif = (struct ifnet *)0; > > though I can't confirm this immediately. (And I can't see why > this would have worked at all). > > Peter > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > > -- Justin C. Walker, Curmudgeon-At-Large * Institute for General Semantics | Manager, CoreOS Networking | Men are from Earth. Apple Computer, Inc. | Women are from Earth. 2 Infinite Loop | Deal with it. Cupertino, CA 95014 | *-------------------------------------*-------------------------------* To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message