Opened 7 years ago
Closed 7 years ago
#13632 closed task (fixed)
tcp: rfc 7323: adding PAWS timestamp check on Receive
Reported by: | a-star | Owned by: | axeld |
---|---|---|---|
Priority: | normal | Milestone: | Unscheduled |
Component: | Network & Internet/TCP | Version: | R1/Development |
Keywords: | tcp, gsoc, slow start | Cc: | |
Blocked By: | Blocking: | ||
Platform: | All |
Description
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.”
Attachments (2)
Change History (7)
by , 7 years ago
Attachment: | tcp-rfc-7323-added-PAWS-timestamp-check-on-Receive.patch added |
---|
comment:1 by , 7 years ago
patch: | 0 → 1 |
---|
comment:2 by , 7 years ago
comment:3 by , 7 years ago
Network byte order conversion was not being applied to the timestamp.value field since we simply had to echo it back to the sender. But now with PAWS processing, it checks if segment.timestamp value is less than fReceivedTimestamp and if so discards the packet. Thus the network byte conversion is important otherwise packets will keep on getting dropped.
by , 7 years ago
Attachment: | 0004-tcp-rfc-7323-added-PAWS-timestamp-check-on-Receive.patch added |
---|
comment:4 by , 7 years ago
Modified the patch to include protection against wrapped up time sequences.
In line 1527 you manage to write the same test in two different ways, only the second one is correct in terms of our style guide (ie.
(a & b) != 0
).