gvisor/pkg
Julian Elischer 3731ebb3fe Adjust included data size on icmp errors
The RFC for icmpv6 specifies that an errant packet should be included
in the returned ICMP packet, and that it should include up to the amount
needed to fill the minimum MTU (1280 bytes) if possible. The current code
included the Link header in that calculation but the RFC is referring
to the IP MTU not the link MTU. Some conformance tests check this and
report an error agains the stack for this.

The full header length shoudl however continue to be used when allocating
header space.

Make the same change for IPv4 for consistency.

Add a test for icmp payload sizing.
Test that the included data in an ICMP error packet conforms to the
requirements of RFC 972, RFC 4443 section 2.4 and RFC 1812 Section 4.3.2.3.

Fixes #5311

PiperOrigin-RevId: 353790203
2021-01-25 20:50:02 -08:00
..
abi Implement F_GETLK fcntl. 2021-01-22 13:58:16 -08:00
amutex Invert dependency between the context and amutex packages. 2020-09-15 15:14:53 -07:00
atomicbitops Automated rollback of changelist 303799678 2020-04-01 11:06:26 -07:00
binary Move Align{Up,Down} into binary package. 2020-02-11 11:09:31 -08:00
bits
bpf Fix more nogo tests 2020-11-03 15:23:32 -08:00
buffer pkg/buffer: Reorganize internal structure to allow dynamic sizes. 2020-09-22 17:56:40 -07:00
cleanup Move Cleanup to its own package 2020-05-28 14:49:06 -07:00
compressio
context Support VFS2 save/restore. 2020-10-23 17:48:33 -07:00
control
coverage Avoid atomic operations in kcov processing. 2021-01-22 11:32:56 -08:00
cpuid Fix simple mistakes identified by goreportcard. 2021-01-12 12:38:22 -08:00
crypto Internal change. 2020-12-03 14:47:16 -08:00
eventchannel Remove legacy bazel configurations. 2020-10-19 16:28:40 -07:00
fd Simplify FD handling for container start/exec 2020-09-04 11:42:02 -07:00
fdchannel Minor fdchannel fixes. 2020-11-13 01:56:23 -08:00
fdnotifier Consistent precondition formatting 2020-08-20 13:32:24 -07:00
flipcall Prepare for supporting cross compilation. 2020-12-09 15:51:33 -08:00
fspath Port most syscalls to VFS2. 2020-02-25 13:37:34 -08:00
gate Deflake third_party/gvisor/pkg/gate/gate_test 2020-03-18 17:42:29 -07:00
gohacks
goid Require sync.Mutex to lock and unlock from the same goroutine 2020-11-19 14:29:34 -08:00
ilist Make ilist split safe. 2021-01-11 13:18:01 -08:00
iovec fdbased: Vectorized write for packet; relax writev syscall filter. 2020-07-15 15:05:32 -07:00
linewriter
lisafs RFC: design for a 9P replacement 2020-09-15 13:19:36 -07:00
log Remove existing nogo exceptions. 2020-12-11 12:06:49 -08:00
marshal Replace remaining uses of reflection-based marshalling. 2020-09-29 18:08:07 -07:00
memutil
merkletree
metric Human-readable metric emit logs 2021-01-13 08:20:00 -08:00
p9 Fix simple mistakes identified by goreportcard. 2021-01-12 12:38:22 -08:00
pool Remove existing nogo exceptions. 2020-12-11 12:06:49 -08:00
procid Bump build constraints to 1.17 2020-08-24 12:58:39 -07:00
rand Actually wrap rand.Reader in bufio.Reader. 2020-03-20 17:02:13 -07:00
refs Add logging option to leak checker. 2020-10-28 18:23:29 -07:00
refsvfs2 Combine reference count logs into one message. 2021-01-15 14:40:26 -08:00
safecopy Don't use REP string instructions in safecopy.memcpy. 2020-04-09 11:03:43 -07:00
safemem
seccomp Fix simple mistakes identified by goreportcard. 2021-01-12 12:38:22 -08:00
secio
segment Fix simple mistakes identified by goreportcard. 2021-01-12 12:38:22 -08:00
sentry Add per endpoint ARP statistics 2021-01-25 16:52:05 -08:00
shim Fix code review issues 2021-01-13 13:06:15 -08:00
sleep Consolidate most synchronization primitive linknames in the sync package. 2020-12-02 19:08:32 -08:00
state Make type sanity checking happen only in race builds. 2021-01-05 18:15:27 -08:00
sync Remove existing nogo exceptions. 2020-12-11 12:06:49 -08:00
syncevent Consolidate most synchronization primitive linknames in the sync package. 2020-12-02 19:08:32 -08:00
syserr
syserror
tcpip Adjust included data size on icmp errors 2021-01-25 20:50:02 -08:00
test
unet Fix more nogo tests 2020-11-03 15:23:32 -08:00
urpc Add benchmarks targets to BuildKite. 2021-01-05 13:21:54 -08:00
usermem
waiter Implement `fcntl` options `F_GETSIG` and `F_SETSIG`. 2020-12-03 06:20:29 -08:00