[108] in Athena Bugs

home help back first fref pref prev next nref lref last post

No subject found in mail header

daemon@ATHENA.MIT.EDU (don@ATHENA.MIT.EDU)
Thu Mar 31 15:27:06 1988

From: <don@ATHENA.MIT.EDU>
Date: Thu, 31 Mar 88 15:26:36 EST
To: bugs@ATHENA.MIT.EDU
here's a fix for ping's "odd-byte" bug:
in the checksum routine, replace the lines
	if( nleft == 1)
		sum += *(u_char*)w;
with
	if( nleft == 1) {
		((u_char *)w)[1] = '\0';
		sum += *w;
	}
i ran into this when i borrowed ping's checksum to use in track.
the existing checksum gives different results on the rt & the vax,
if it's passed an odd number of bytes. interestingly, the results
seem always to differ by the value 0x9f6 == 2550. weird.
					-don

home help back first fref pref prev next nref lref last post