[Bug 252263] [tcp] Should we reject packets with the nonmonotonic timestamp?

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Dec 29 09:44:33 UTC 2020


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=252263

            Bug ID: 252263
           Summary: [tcp] Should we reject packets with the nonmonotonic
                    timestamp?
           Product: Base System
           Version: 12.1-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: kern
          Assignee: bugs at FreeBSD.org
          Reporter: yonghaoz1994 at gmail.com

The following packetdrill shows different result of last read between Linux and
FreeBSD

```
0   socket(..., SOCK_STREAM, IPPROTO_TCP) = 3
+0  setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
+0 fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
+0  bind(3, ..., ...) = 0
+0  listen(3, 1) = 0

+0  < S 0:0(0) win 1000 <TS val 100 ecr 0,eol,eol>
+.5  > S. 0:0(0) ack 1 <...>
+.1 < . 1:1(0) ack 1 win 1000
+0.1 accept(3, ..., ...) = 4
+0 fcntl(4, F_SETFL, O_RDWR|O_NONBLOCK) = 0

+0 < . 1:1001(1000) ack 1 win 1000 <TS val 100 ecr 0,eol,eol>
+0.1 read(4, ..., 1000) = 1000

// Linux accept this packet, while FreeBSD reject.
// But if we set the TS val to 50, they both reject it.
+0 < . 1001:2001(1000) ack 1 win 1000 <TS val 99 ecr 0,eol,eol>

+0.1 read(4, ..., 1000) =  1000
```

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list