Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Nov 1999 12:48:47 +1100
From:      Peter Jeremy <jeremyp@gsmx07.alcatel.com.au>
To:        hackers@FreeBSD.ORG
Cc:        joe@pavilion.net
Subject:   Re: Ping - sized tests with 0% and 100% packet loss!  Any ideas?
Message-ID:  <99Nov2.124342est.40369@border.alcanet.com.au>

next in thread | raw e-mail | index | archive | help
At Tue, 2 Nov 1999 00:16:02 +0000, Josef Karthauser <joe@pavilion.net> 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.

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?99Nov2.124342est.40369>