What Happens if a UDP Checksum Fails?
When a User Datagram Protocol (UDP) packet fails its checksum validation at the receiving end, the network stack immediately and silently discards the packet. Because UDP is a connectionless and unreliable transport protocol, no error notification, negative acknowledgment (NACK), or retransmission request is generated or sent back to the sender, and the corrupted data is never delivered to the receiving application.
The Checksum Verification Process
When a network device receives a UDP packet, the operating system’s networking stack performs an integrity check:
- Recalculation: The receiver calculates the checksum over the UDP pseudo-header (containing source and destination IP addresses, protocol, and UDP length), the standard UDP header, and the data payload.
- Comparison: The calculated checksum is compared against the value stored in the UDP header’s checksum field.
- Mismatch Detection: If the values do not match, it indicates that bit corruption occurred during transit (due to noise, hardware faults, or transmission errors).
Immediate Actions Taken Upon Failure
Once a checksum mismatch is detected, the receiver executes a specific set of operations:
- Silent Discard: The packet is dropped immediately from memory. It is not queued in the socket buffer, preventing the destination application from receiving corrupted data.
- No Sender Notification: The sender receives no ICMP error messages or feedback indicating that the packet was lost. The sender assumes the packet was transmitted successfully unless the application layer defines its own tracking.
- Metric Logging: The operating system increments an
internal error counter. On Unix-like systems, this can be observed via
network diagnostic tools (such as viewing
Udp: InErrorsorRcvbufErrorsinnetstat -s).
Impact on the Application Layer
Because UDP offloads reliability to the developer, how a dropped packet impacts performance depends entirely on the application:
- Real-Time Streaming and VoIP: Applications typically ignore the lost packet and continue processing the next incoming packet, as real-time performance is favored over completeness.
- Custom Reliable UDP Protocols: Applications requiring data integrity (such as DNS, TFTP, or protocols built on QUIC) implement their own sequence numbering, timeouts, and retransmission logic at the application layer to detect missing data and request it again.