summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/transport/tcp/testing/context
diff options
context:
space:
mode:
authorGhanan Gowripalan <ghanan@google.com>2020-01-31 13:54:57 -0800
committergVisor bot <gvisor-bot@google.com>2020-01-31 13:55:46 -0800
commit77bf586db75b3dbd9dcb14c349bde8372d26425c (patch)
treecead014135d1bca14a0382a0b2396a7c1093aa91 /pkg/tcpip/transport/tcp/testing/context
parent528dd1ec72fee1dd63c734fe92d1b972b5735b8f (diff)
Use multicast Ethernet address for multicast NDP
As per RFC 2464 section 7, an IPv6 packet with a multicast destination address is transmitted to the mapped Ethernet multicast address. Test: - ipv6.TestLinkResolution - stack_test.TestDADResolve - stack_test.TestRouterSolicitation PiperOrigin-RevId: 292610529
Diffstat (limited to 'pkg/tcpip/transport/tcp/testing/context')
-rw-r--r--pkg/tcpip/transport/tcp/testing/context/context.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/pkg/tcpip/transport/tcp/testing/context/context.go b/pkg/tcpip/transport/tcp/testing/context/context.go
index 730ac4292..1e9a0dea3 100644
--- a/pkg/tcpip/transport/tcp/testing/context/context.go
+++ b/pkg/tcpip/transport/tcp/testing/context/context.go
@@ -1082,7 +1082,11 @@ func (c *Context) SACKEnabled() bool {
// SetGSOEnabled enables or disables generic segmentation offload.
func (c *Context) SetGSOEnabled(enable bool) {
- c.linkEP.GSO = enable
+ if enable {
+ c.linkEP.LinkEPCapabilities |= stack.CapabilityHardwareGSO
+ } else {
+ c.linkEP.LinkEPCapabilities &^= stack.CapabilityHardwareGSO
+ }
}
// MSSWithoutOptions returns the value for the MSS used by the stack when no