From 10bbcf97d25b824aa0565af114e3272d3e314d19 Mon Sep 17 00:00:00 2001 From: Ghanan Gowripalan Date: Thu, 28 Nov 2019 17:13:46 -0800 Subject: 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 --- pkg/tcpip/transport/tcp/testing/context/context.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'pkg/tcpip/transport/tcp/testing/context') 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) +} -- cgit v1.2.3