diff options
author | Ghanan Gowripalan <ghanan@google.com> | 2019-11-28 17:13:46 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-11-28 17:15:07 -0800 |
commit | 10bbcf97d25b824aa0565af114e3272d3e314d19 (patch) | |
tree | 323fde2833121c9fff078fb6cbcb1d59c9b9851a /pkg/tcpip/transport/tcp/testing | |
parent | 684f757a228f88e5fabe6ebe6ed54f0db20fd63d (diff) |
Test handling segments on completed but not yet accepted TCP connections
This change does not introduce any new features, or modify existing ones.
This change tests handling TCP segments right away for connections that were
completed from a listening endpoint.
PiperOrigin-RevId: 282986457
Diffstat (limited to 'pkg/tcpip/transport/tcp/testing')
-rw-r--r-- | pkg/tcpip/transport/tcp/testing/context/context.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/tcpip/transport/tcp/testing/context/context.go b/pkg/tcpip/transport/tcp/testing/context/context.go index 04fdaaed1..6cb66c1af 100644 --- a/pkg/tcpip/transport/tcp/testing/context/context.go +++ b/pkg/tcpip/transport/tcp/testing/context/context.go @@ -1089,3 +1089,9 @@ func (c *Context) SetGSOEnabled(enable bool) { func (c *Context) MSSWithoutOptions() uint16 { return uint16(c.linkEP.MTU() - header.IPv4MinimumSize - header.TCPMinimumSize) } + +// MSSWithoutOptionsV6 returns the value for the MSS used by the stack when no +// options are in use for IPv6 packets. +func (c *Context) MSSWithoutOptionsV6() uint16 { + return uint16(c.linkEP.MTU() - header.IPv6MinimumSize - header.TCPMinimumSize) +} |