Files
linux/tools
Minxi Hou a211b03fee selftests/net/openvswitch: add output truncation test
Add test_trunc exercising the OVS_ACTION_ATTR_TRUNC action. The test
verifies truncation limits in four steps: reject trunc(1) and
trunc(13) which are below ETH_HLEN, confirm normal forwarding works,
apply trunc(14) which truncates packets to the Ethernet header and
verify ping fails, then restore normal forwarding and verify recovery.

The kernel requires max_len >= ETH_HLEN (14 bytes). trunc(14) sets
OVS_CB(skb)->cutlen so pskb_trim strips the IP payload at output
time; the receiver drops the runt frame and no echo reply is
generated.

Signed-off-by: Minxi Hou <houminxi@gmail.com>
Reviewed-by: Aaron Conole <aconole@redhat.com>
Link: https://patch.msgid.link/20260702074926.1174810-1-houminxi@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-07-08 10:00:32 +02:00
..
2026-04-14 04:43:26 +00:00