diff options
author | Anita Zhang <the.anitazha@gmail.com> | 2021-10-11 09:25:20 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-10-13 04:13:56 +0200 |
commit | 0b4f8d94989dec304e70102798d5e942effe8bee (patch) | |
tree | a3e799f00b1a386bc1da3ad0244b38c55c03cce3 /src/core | |
parent | Merge pull request #20992 from keszybz/fix-two-outputs (diff) | |
download | systemd-0b4f8d94989dec304e70102798d5e942effe8bee.tar.xz systemd-0b4f8d94989dec304e70102798d5e942effe8bee.zip |
core: serialize device cgroup bpf progs across daemon-reload/reexec
Follows what was done in b57d75232615f98aefcf41cb145ec2ea3262857d and
adds a test that verifies the device BPF program is not detached during
reload/reexec.
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/unit-serialize.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/unit-serialize.c b/src/core/unit-serialize.c index 9e1664ff53..3458d7017b 100644 --- a/src/core/unit-serialize.c +++ b/src/core/unit-serialize.c @@ -171,6 +171,7 @@ int unit_serialize(Unit *u, FILE *f, FDSet *fds, bool switching_root) { (void) bpf_program_serialize_attachment(f, fds, "ip-bpf-ingress-installed", u->ip_bpf_ingress_installed); (void) bpf_program_serialize_attachment(f, fds, "ip-bpf-egress-installed", u->ip_bpf_egress_installed); + (void) bpf_program_serialize_attachment(f, fds, "bpf-device-control-installed", u->bpf_device_control_installed); (void) bpf_program_serialize_attachment_set(f, fds, "ip-bpf-custom-ingress-installed", u->ip_bpf_custom_ingress_installed); (void) bpf_program_serialize_attachment_set(f, fds, "ip-bpf-custom-egress-installed", u->ip_bpf_custom_egress_installed); @@ -408,6 +409,9 @@ int unit_deserialize(Unit *u, FILE *f, FDSet *fds) { } else if (streq(l, "ip-bpf-egress-installed")) { (void) bpf_program_deserialize_attachment(v, fds, &u->ip_bpf_egress_installed); continue; + } else if (streq(l, "bpf-device-control-installed")) { + (void) bpf_program_deserialize_attachment(v, fds, &u->bpf_device_control_installed); + continue; } else if (streq(l, "ip-bpf-custom-ingress-installed")) { (void) bpf_program_deserialize_attachment_set(v, fds, &u->ip_bpf_custom_ingress_installed); |