selftests/bpf: Make sure zero-len skbs aren't redirectable
authorStanislav Fomichev <sdf@google.com>
Mon, 21 Nov 2022 18:03:40 +0000 (10:03 -0800)
committerMartin KaFai Lau <martin.lau@kernel.org>
Mon, 21 Nov 2022 20:47:04 +0000 (12:47 -0800)
commit68f8e3d4b916531ea3bb8b83e35138cf78f2fce5
tree53db79068d2a84a990ea73a1fe8f3eb6107ffe90
parent114039b342014680911c35bd6b72624180fd669a
selftests/bpf: Make sure zero-len skbs aren't redirectable

LWT_XMIT to test L3 case, TC to test L2 case.

v2:
- s/veth_ifindex/ipip_ifindex/ in two places (Martin)
- add comment about which condition triggers the rejection (Martin)

Signed-off-by: Stanislav Fomichev <sdf@google.com>
Link: https://lore.kernel.org/r/20221121180340.1983627-2-sdf@google.com
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
tools/testing/selftests/bpf/prog_tests/empty_skb.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/empty_skb.c [new file with mode: 0644]