Files
systemd/src/test
Julia Kartseva b57162aafb tests: add unit file tests for BPFProgram=
- Pin trivial bpf programs to bpf filesystem, compose BPFProgram= option
string and pass it to a unit. Programs store `0` in r0 BPF register for
denying action, e.g. drop a packet.
- Load trivial BPF programs
- Test is skipped if not run under root or if can not lock enough
memory.
- For egress and ingress hooks, test BPFProgram= option along with
with IP{Egress|Ingress}FilterPath=, expected result should not depend on
which rule is executed first.
Expected results for BPF_CGROUP_INET_INGRESS:
5 packets transmitted, 0 received, 100% packet loss, time 89ms

For BPF_CGROUP_INET_SOCK_CREATE:
ping: socket: Operation not permitted
2021-04-09 20:28:47 -07:00
..
2021-03-18 11:59:31 +01:00
2021-02-25 05:54:11 +09:00
2021-01-25 20:32:18 +09:00
2021-02-18 16:38:27 +01:00
2021-03-11 09:21:07 +01:00