Florian Westphal
a94098d490
selftests/bpf: Add bpf_program__attach_netfilter helper test
Call bpf_program__attach_netfilter() with different
protocol/hook/priority combinations.
Test fails if supposedly-illegal attachments work
(e.g., bogus protocol family, illegal priority and so on) or if a
should-work attachment fails. Expected output:
./test_progs -t netfilter_link_attach
#145/1 netfilter_link_attach/allzero:OK
#145/2 netfilter_link_attach/invalid-pf:OK
#145/3 netfilter_link_attach/invalid-hooknum:OK
#145/4 netfilter_link_attach/invalid-priority-min:OK
#145/5 netfilter_link_attach/invalid-priority-max:OK
#145/6 netfilter_link_attach/invalid-flags:OK
#145/7 netfilter_link_attach/invalid-inet-not-supported:OK
#145/8 netfilter_link_attach/attach ipv4:OK
#145/9 netfilter_link_attach/attach ipv6:OK
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Reviewed-by: Toke Høiland-Jørgensen <toke@redhat.com>
Acked-by: Daniel Xu <dxu@dxuuu.xyz>
Link: https://lore.kernel.org/bpf/20230628152738.22765-3-fw@strlen.de
2023-06-30 12:34:38 -07:00
..
2023-04-18 16:39:34 -07:00
2023-06-27 12:25:42 -07:00
2023-06-29 15:46:17 +02:00
2023-06-29 15:46:17 +02:00
2023-05-11 10:56:24 +02:00
2023-06-28 16:43:10 -07:00
2023-03-29 06:52:08 -04:00
2023-06-30 12:34:31 -07:00
2023-04-24 12:02:25 -07:00
2023-04-25 13:00:41 -07:00
2023-06-24 15:45:49 -07:00
2023-06-27 15:05:41 -07:00
2023-06-28 16:43:10 -07:00
2023-05-08 10:46:49 -06:00
2023-04-27 17:41:23 -07:00
2023-05-30 15:20:12 +01:00
2023-06-30 12:34:38 -07:00
2023-04-25 19:26:59 -04:00
2023-04-25 17:02:13 -04:00
2023-06-09 12:08:08 -04:00
2023-05-17 17:02:09 -10:00
2023-04-18 14:22:12 -07:00