summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/transport/tcpconntrack
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-04-20 05:18:38 +0000
committergVisor bot <gvisor-bot@google.com>2020-04-20 05:18:38 +0000
commitf9519276e4e7f1b35af962f22fb54f2b40ecb396 (patch)
tree97c06168090c7dcd8efa917cc1d2c469c791366a /pkg/tcpip/transport/tcpconntrack
parent30168d475268997a48c351461aed7e11106d9053 (diff)
parentdb2a60be67f0e869a58eb12d253a0d7fe13ebfa3 (diff)
Merge release-20200323.0-187-gdb2a60b (automated)
Diffstat (limited to 'pkg/tcpip/transport/tcpconntrack')
-rwxr-xr-xpkg/tcpip/transport/tcpconntrack/tcp_conntrack.go13
1 files changed, 2 insertions, 11 deletions
diff --git a/pkg/tcpip/transport/tcpconntrack/tcp_conntrack.go b/pkg/tcpip/transport/tcpconntrack/tcp_conntrack.go
index 93712cd45..30d05200f 100755
--- a/pkg/tcpip/transport/tcpconntrack/tcp_conntrack.go
+++ b/pkg/tcpip/transport/tcpconntrack/tcp_conntrack.go
@@ -20,6 +20,7 @@ package tcpconntrack
import (
"gvisor.dev/gvisor/pkg/tcpip/header"
"gvisor.dev/gvisor/pkg/tcpip/seqnum"
+ "gvisor.dev/gvisor/pkg/tcpip/transport/tcp"
)
// Result is returned when the state of a TCB is updated in response to an
@@ -311,17 +312,7 @@ type stream struct {
// the window is zero, if it's a packet with no payload and sequence number
// equal to una.
func (s *stream) acceptable(segSeq seqnum.Value, segLen seqnum.Size) bool {
- wnd := s.una.Size(s.end)
- if wnd == 0 {
- return segLen == 0 && segSeq == s.una
- }
-
- // Make sure [segSeq, seqSeq+segLen) is non-empty.
- if segLen == 0 {
- segLen = 1
- }
-
- return seqnum.Overlap(s.una, wnd, segSeq, segLen)
+ return tcp.Acceptable(segSeq, segLen, s.una, s.end)
}
// closed determines if the stream has already been closed. This happens when