views:

55

answers:

1

Has anyone tested what will happen if checksum doesn't match?

Will the packet be ignored directly?

Suppose it's HTTP protocal at the application layer.

+1  A: 

HTTP will never see the bad packet. Remember that TCP guarantees (best effort) that it will give you an error free contiguous stream of data, which is what HTTP uses.

In TCP, at some point the client will generate a NACK instead of an ACK. Depending on if selective ACK was negotiated, either the bad packet or a subset of the packets received will be retransmitted by the server (in the TCP layer, the HTTP server has no knowledge except for higher latency).

The checksum is discussed in the TCP RFC: http://www.faqs.org/rfcs/rfc793.html Section 3.1 (Page 16)

RFC1071 goes into detail about the checksum.

Yann Ramin
Can you also elaborate how the checksum is calculated?
httpinterpret
@httpinterpret: Added links to the relevant RFCs
Yann Ramin