linux/tools/testing/selftests/tc-testing/tc-tests
Victor Nogueira f7d109f176 selftests: tc: act_pedit: require matching IPv4 L4 protocol
Add a tdc test that checks the act_pedit extended L4 header mode does not
edit a packet whose IPv4 protocol does not match the selected transport
header.

The test installs an ingress pedit rule that sets the UDP destination
port, then injects a TCP packet with dport 2222. The UDP and TCP
destination ports sit at the same L4 offset, so a buggy kernel rewrites
the TCP dport. A second flower filter matches TCP dport 2222 and drops
the packet through an indexed gact action; the test then verifies via
JSON that this action saw exactly one packet, i.e. the dport was left
untouched and still matched 2222.

Signed-off-by: Victor Nogueira <victor@mojatatu.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
History 2026-06-12 15:17:57 -07:00
..
actions selftests: tc: act_pedit: require matching IPv4 L4 protocol 2026-06-12 15:17:57 -07:00
filters selftests: tc-testing: reduce rshift value 2025-01-04 08:49:47 -08:00
infra Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2026-05-28 14:02:21 -07:00
qdiscs selftests/tc-testing: Add netem test case exercising loops 2026-05-28 12:26:37 +02:00