linux-stable/tools
Florian Westphal 3853c4e271 selftests: netfilter: check stateless nat udp checksum fixup
commit aad51ca71a upstream.

Add a test that sends large udp packet (which is fragmented)
via a stateless nft nat rule, i.e. 'ip saddr set 10.2.3.4'
and check that the datagram is received by peer.

On kernels without
commit 4e1860a386 ("netfilter: nft_payload: do not update layer 4 checksum when mangling fragments")',
this will fail with:

cmp: EOF on /tmp/tmp.V1q0iXJyQF which is empty
-rw------- 1 root root 4096 Jan 24 22:03 /tmp/tmp.Aaqnq4rBKS
-rw------- 1 root root    0 Jan 24 22:03 /tmp/tmp.V1q0iXJyQF
ERROR: in and output file mismatch when checking udp with stateless nat
FAIL: nftables v1.0.0 (Fearless Fosdick #2)

On patched kernels, this will show:
PASS: IP statless for ns2-PFp89amx

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-08 18:34:14 +01:00
..
accounting
arch x86/insn: Use get_unaligned() instead of memcpy() 2021-11-18 19:16:30 +01:00
bootconfig tools/bootconfig: Define memblock_free_ptr() to fix build error 2021-09-15 09:49:48 -07:00
bpf tools/resolve_btfids: Do not print any commands when building silently 2022-02-08 18:34:12 +01:00
build tools build: Remove needless libpython-version feature check that breaks test-all fast path 2021-12-14 10:57:18 +01:00
cgroup
debugging
edid
firewire
firmware
gpio
hv
iio
include tools include UAPI: Sync sound/asound.h copy with the kernel sources 2022-02-08 18:34:14 +01:00
io_uring
kvm/kvm_stat KVM: kvm_stat: do not show halt_wait_ns 2021-10-18 14:07:18 -04:00
laptop
leds
lib libbpf: Accommodate DWARF/compiler bug with duplicated structs 2022-01-27 11:04:28 +01:00
memory-model
objtool objtool: Handle __sanitize_cov*() tail calls 2021-11-18 19:16:23 +01:00
pci
pcmcia
perf perf stat: Fix display of grouped aliased events 2022-02-08 18:34:12 +01:00
power
rcu
scripts
spi
testing selftests: netfilter: check stateless nat udp checksum fixup 2022-02-08 18:34:14 +01:00
thermal/tmon
time
tracing tools/latency-collector: Use correct size when writing queue_full_warning 2021-11-18 19:16:19 +01:00
usb usb: testusb: Fix for showing the connection speed 2021-09-14 10:31:41 +02:00
virtio
vm tools/vm/page-types: remove dependency on opt_file for idle page tracking 2021-09-24 16:13:35 -07:00
wmi
Makefile