Subject: Re: NFS lossage from NetBSD to SunOS
To: Gordon W. Ross <gwr@mc.com>
From: Greg Wohletz <greg@duke.CS.UNLV.EDU>
List: current-users
Date: 05/02/1996 13:19:38
>> Date: Thu, 02 May 1996 12:33:21 -0700
>> From: Greg Wohletz <greg@duke.CS.UNLV.EDU>
>>
>> >I've heard that suggested too (about udp_cksum in SunOS) but
>> >it never made any difference for me if it was on or off.
>> >I doubt that is the problem.
>>
>> Well i sure have. I've experienced both NFS file corruption and DNS
>> request corruption at the hands of this. BTW, the person who said
>> that COMPAT_42 turns off udpcksum in netbsd 1.1 was correct. In fact
>> this seems to be the only thing that COMPAT_42 does (not to be
>> confused with TCP_COMPAT_42). Unless there is some good reason for
>> this I'd suggest getting rid of that option, there just isn't any good
>> reason to ever turn off UDP checksums.
>
>Is there a good test to determine when this lossage exists?
>BTW, Why is the Ethernet CRC not a sufficient error check?
Who knows where your packet might travel. The following is from:
Requirements for Internet Hosts -- Communication Layers
Network Working Group, Internet Engineering Task Force
Request for Comments: 1122
R. Braden, Editor
October 1989
4.1.3.4 UDP Checksums
A host MUST implement the facility to generate and validate UDP
checksums. An application MAY optionally be able to control whether a
UDP checksum will be generated, but it MUST default to checksumming
on.
If a UDP datagram is received with a checksum that is non- zero and
invalid, UDP MUST silently discard the datagram. An application MAY
optionally be able to control whether UDP datagrams without checksums
should be discarded or passed to the application.
DISCUSSION:
Some applications that normally run only across local area networks
have chosen to turn off UDP checksums for efficiency. As a result,
numerous cases of undetected errors have been reported. The
advisability of ever turning off UDP checksumming is very
controversial.
IMPLEMENTATION:
There is a common implementation error in UDP checksums. Unlike the
TCP checksum, the UDP checksum is optional; the value zero is
transmitted in the checksum field of a UDP header to indicate the
absence of a checksum. If the transmitter really calculates a UDP
checksum of zero, it must transmit the checksum as all 1's (65535). No
special action is required at the receiver, since zero and 65535 are
equivalent in 1's complement arithmetic.
--greg