linux-stable/tools
Guillaume Nault a7246d3949 selftest: net: Test IPv4 PMTU exceptions with DSCP and ECN
[ Upstream commit ec730c3e1f ]

Add two tests to pmtu.sh, for verifying that PMTU exceptions get
properly created for routes that don't belong to the main table.

A fib-rule based on the packet's DSCP field is used to jump to the
correct table. ECN shouldn't interfere with this process, so each test
has two components: one that only sets DSCP and one that sets both DSCP
and ECN.

One of the test triggers PMTU exceptions using ICMP Echo Requests, the
other using UDP packets (to test different handlers in the kernel).

A few adjustments are necessary in the rest of the script to allow
policy routing scenarios:

  * Add global variable rt_table that allows setup_routing_*() to
    add routes to a specific routing table. By default rt_table is set
    to "main", so existing tests don't need to be modified.

  * Another global variable, policy_mark, is used to define which
    dsfield value is used for policy routing. This variable has no
    effect on tests that don't use policy routing.

  * The UDP version of the test uses socat. So cleanup() now also need
    to kill socat PIDs.

  * route_get_dst_pmtu_from_exception() and route_get_dst_exception()
    now take an optional third argument specifying the dsfield. If
    not specified, 0 is used, so existing users don't need to be
    modified.

Signed-off-by: Guillaume Nault <gnault@redhat.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Stable-dep-of: 139512191b ("ipv4: use RCU protection in __ip_rt_update_pmtu()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-03-13 12:50:43 +01:00
..
accounting
arch
bootconfig tools/bootconfig: Fix the wrong format specifier 2025-03-13 12:50:10 +01:00
bpf bpftool: fix potential NULL pointer dereferencing in prog_dump() 2024-12-14 19:51:29 +01:00
build
cgroup
debugging
edid
firewire
firmware
gpio
hv
iio
include
io_uring
kvm/kvm_stat
laptop
leds
lib libbpf: Fix segfault due to libelf functions not setting errno 2025-03-13 12:50:00 +01:00
memory-model
objtool objtool/x86: allow syscall instruction 2024-12-19 18:07:22 +01:00
pci
pcmcia
perf perf bench: Fix undefined behavior in cmpworker() 2025-03-13 12:50:26 +01:00
power cpupower: fix TSC MHz calculation 2025-03-13 12:49:56 +01:00
rcu
scripts tools: Override makefile ARCH variable if defined, but empty 2024-12-14 19:51:30 +01:00
spi
testing selftest: net: Test IPv4 PMTU exceptions with DSCP and ECN 2025-03-13 12:50:43 +01:00
thermal/tmon
time
tracing
usb
virtio
vm
wmi
Makefile