diff options
author | Andrii Nakryiko <andrii@kernel.org> | 2023-06-30 12:33:08 -0700 |
---|---|---|
committer | Andrii Nakryiko <andrii@kernel.org> | 2023-06-30 12:34:46 -0700 |
commit | c20f9cef725bc6b19efe372696e8000fb5af0d46 (patch) | |
tree | bcb4b610e51a8ed0ddff16f9019d60969fd2d1e3 /tools/lib/bpf/bpf.h | |
parent | 2d2c95162de8fc6875c9c3d39f83527ae28e2e8a (diff) | |
parent | a94098d490e17d652770f2309fcb9b46bc4cf864 (diff) |
Merge branch 'libbpf: add netfilter link attach helper'
Florian Westphal says:
====================
v4: address comment from Daniel Xu:
- use human-readable test names in 2/2
v3: address comments from Andrii:
- prune verbose error message in 1/2
- use bpf_link_create internally in 1/2
- use subtests in patch 2/2
When initial netfilter bpf program type support got added one
suggestion was to extend libbpf with a helper to ease attachment
of nf programs to the hook locations.
Add such a helper and a demo test case that attaches a dummy
program to various combinations.
I tested that the selftest fails when changing the expected
outcome (i.e., set 'success' when it should fail and v.v.).
====================
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Diffstat (limited to 'tools/lib/bpf/bpf.h')
-rw-r--r-- | tools/lib/bpf/bpf.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/lib/bpf/bpf.h b/tools/lib/bpf/bpf.h index 9aa0ee473754..c676295ab9bf 100644 --- a/tools/lib/bpf/bpf.h +++ b/tools/lib/bpf/bpf.h @@ -349,6 +349,12 @@ struct bpf_link_create_opts { struct { __u64 cookie; } tracing; + struct { + __u32 pf; + __u32 hooknum; + __s32 priority; + __u32 flags; + } netfilter; }; size_t :0; }; |