tcp: rfc 7323: adding PAWS timestamp check on Receive
|Reported by:||a-star||Owned by:||axeld|
|Component:||Network & Internet/TCP||Version:||R1/Development|
|Keywords:||tcp, gsoc, slow start||Cc:|
|Has a Patch:||yes||Platform:||All|
PAWS = Protection against wrapped sequences
rfc 7323 tells us that “PAWS processing MUST take precedence over the regular TCP acceptability check” and defines two new rules:
R1) If there is a Timestamps option in the arriving segment, SEG.TSval < TS.Recent, TS.Recent is valid (see later discussion), and if the RST bit is not set, then treat the arriving segment as not acceptable:
Send an acknowledgment in reply as specified in Section 3.9 of [RFC0793], page 69, and drop the segment.
R3) If an arriving segment satisfies SEG.TSval >= TS.Recent and SEG.SEQ <= Last.ACK.sent (see Section 4.3), then record its timestamp in TS.Recent.
The rule R3 was already implemented so I implemented R1.
Under section 3.2, the rfc also states that:
“If a non-<RST> segment is received without a TSopt, a TCP SHOULD silently drop the segment. A TCP MUST NOT abort a TCP connection because any segment lacks an expected Tsopt.”
“If a TSopt is received on a connection where TSopt was not negotiated in the initial three-way handshake, the TSopt MUST be ignored and the packet processed normally.”
Change History (7)
by , 3 years ago
by , 2 years ago