Connected: An Internet Encyclopedia
RFC 1122 - 4.1.3.4 UDP Checksums

Top: Connected: An Internet Encyclopedia
Up: Requests For Comments
Up: RFC 1122
Up: 4. TRANSPORT PROTOCOLS
Up: 4.1 USER DATAGRAM PROTOCOL -- UDP
Up: 4.1.3 SPECIFIC ISSUES
Prev: 4.1.3.3 ICMP Messages
Next: 4.1.3.5 UDP Multihoming

### 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.

Next: 4.1.3.5 UDP Multihoming

Connected: An Internet Encyclopedia
RFC 1122 - 4.1.3.4 UDP Checksums