Search code examples
c++socketsnetwork-programmingudp

Are UDP packets dropped when UDP header checksum is incorrect?


If I open a raw socket, and send UDP packets with a wrong checksum, would the packets be dropped at the other side by the TCP/IP stack?


Solution

  • If comes packet with wrong checksum, OS will drop it before passing it to the socket.

    Destination application cannot determine if packet was lost or comes with wrong checksum. I think that it also cannot force else behavior.