From b6ca96b9b9e71ba57653cf9d3ef0767771949378 Mon Sep 17 00:00:00 2001 From: Toshi Kikuchi Date: Sat, 12 Sep 2020 23:19:34 -0700 Subject: Cap reassembled IPv6 packets at 65535 octets IPv4 can accept 65536-octet reassembled packets. Test: - ipv4_test.TestInvalidFragments - ipv4_test.TestReceiveFragments - ipv6.TestInvalidIPv6Fragments - ipv6.TestReceiveIPv6Fragments Fixes #3770 PiperOrigin-RevId: 331382977 --- pkg/tcpip/header/ipv6.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'pkg/tcpip/header/ipv6.go') diff --git a/pkg/tcpip/header/ipv6.go b/pkg/tcpip/header/ipv6.go index ea3823898..0761a1807 100644 --- a/pkg/tcpip/header/ipv6.go +++ b/pkg/tcpip/header/ipv6.go @@ -74,6 +74,10 @@ const ( // IPv6AddressSize is the size, in bytes, of an IPv6 address. IPv6AddressSize = 16 + // IPv6MaximumPayloadSize is the maximum size of a valid IPv6 payload per + // RFC 8200 Section 4.5. + IPv6MaximumPayloadSize = 65535 + // IPv6ProtocolNumber is IPv6's network protocol number. IPv6ProtocolNumber tcpip.NetworkProtocolNumber = 0x86dd -- cgit v1.2.3