]> git.ipfire.org Git - thirdparty/systemd.git/commit
core/bpf-firewall: replace bpf_firewall_supported() with bpf_program_supported()
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 16 Apr 2025 17:39:08 +0000 (02:39 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 9 May 2025 15:17:52 +0000 (00:17 +0900)
commitec3c5cfac74e8361a3b0153cc9e8cfdbbcbde0c6
tree016d3511743a78b1cab821df775c2e8abf8d66dd
parent22e2f0642897cfa7ba975527f5394bd7fcdf639b
core/bpf-firewall: replace bpf_firewall_supported() with bpf_program_supported()

Note, BPF_PROG_TYPE_CGROUP_SKB is supported since kernel v4.10, and
BPF_F_ALLOW_MULTI and program name is supported since kernel v4.15.
As our baseline on the kernel is v5.4, we can assume that the type,
flag, and naming is supported when bpf_program_supported() succeeds.
src/core/bpf-firewall.c
src/core/bpf-firewall.h
src/core/cgroup.c
src/core/dbus-cgroup.c
src/core/load-fragment.c
src/core/socket.c
src/test/test-bpf-firewall.c