diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-05-08 18:28:02 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-05-08 18:28:02 +0000 |
commit | 304cb3b412bc515e2960977339ab53fc593d61b5 (patch) | |
tree | 21c79c0d8c745392e695d68c19f7a39b37beb436 /pkg/tcpip/header | |
parent | d0a2fa0121bc4258b3c85777b1d5715d5b9e0fdd (diff) | |
parent | 5d7d5ed7d6ffd8d420f042a22b22e0527e78d441 (diff) |
Merge release-20200422.0-58-g5d7d5ed (automated)
Diffstat (limited to 'pkg/tcpip/header')
-rw-r--r-- | pkg/tcpip/header/tcp.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pkg/tcpip/header/tcp.go b/pkg/tcpip/header/tcp.go index 21581257b..29454c4b9 100644 --- a/pkg/tcpip/header/tcp.go +++ b/pkg/tcpip/header/tcp.go @@ -609,5 +609,8 @@ func Acceptable(segSeq seqnum.Value, segLen seqnum.Size, rcvNxt, rcvAcc seqnum.V } // Page 70 of RFC 793 allows packets that can be made "acceptable" by trimming // the payload, so we'll accept any payload that overlaps the receieve window. - return rcvNxt.LessThan(segSeq.Add(segLen)) && segSeq.LessThan(rcvAcc) + // segSeq < rcvAcc is more correct according to RFC, however, Linux does it + // differently, it uses segSeq <= rcvAcc, we'd want to keep the same behavior + // as Linux. + return rcvNxt.LessThan(segSeq.Add(segLen)) && segSeq.LessThanEq(rcvAcc) } |