]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/core/unit.c
bpf-firewall: move destruction of IP firewall objects to bpf-firewall.c
authorLennart Poettering <lennart@poettering.net>
Tue, 8 Jun 2021 13:25:28 +0000 (15:25 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 8 Jun 2021 19:54:49 +0000 (21:54 +0200)
commit0fd9c28cc9487fadcddc5ea5bd0c7ca2ad525534
treec749f7130097df33a0e2505991d079d2648f8e0d
parent7ff9d99e9e8b75930aa05b45eb21889eac8af014
bpf-firewall: move destruction of IP firewall objects to bpf-firewall.c

These are so many runtime objects, let's add a bpf_firewall_close()
helper that destroys them all, and call that from unit_free(), simply as
an excercise of encapsulating more BPF code in bpf-firewall.c.

This also brings the destruction order and variable declaration order in
struct Unit into the same systematic order.

No change in behaviour just some minor refactoring.
src/core/bpf-firewall.c
src/core/bpf-firewall.h
src/core/unit.c
src/core/unit.h