diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-12-01 23:47:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-01 23:47:17 +0100 |
commit | 9db6a416dd2f8a1e338a7275fc8b0583d8ed2450 (patch) | |
tree | ab2b8fafc69797435991ca613a79f4e7dacb1b77 /src/core/bpf-firewall.c | |
parent | Merge pull request #21591 from yuwata/core-bpf-firewall-unsupported-reason (diff) | |
parent | test: run commands with debug level logs in TEST-65-ANALYZE (diff) | |
download | systemd-9db6a416dd2f8a1e338a7275fc8b0583d8ed2450.tar.xz systemd-9db6a416dd2f8a1e338a7275fc8b0583d8ed2450.zip |
Merge pull request #21583 from bluca/bpf_assert
cgroup: don't emit BPF firewall warning when manager is in test mode
Diffstat (limited to 'src/core/bpf-firewall.c')
-rw-r--r-- | src/core/bpf-firewall.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/bpf-firewall.c b/src/core/bpf-firewall.c index 2d154710e0..3c1c02e444 100644 --- a/src/core/bpf-firewall.c +++ b/src/core/bpf-firewall.c @@ -914,7 +914,10 @@ int bpf_firewall_supported(void) { void emit_bpf_firewall_warning(Unit *u) { static bool warned = false; - if (!warned) { + assert(u); + assert(u->manager); + + if (!warned && !MANAGER_IS_TEST_RUN(u->manager)) { bool quiet = bpf_firewall_unsupported_reason == -EPERM && detect_container() > 0; log_unit_full_errno(u, quiet ? LOG_DEBUG : LOG_WARNING, bpf_firewall_unsupported_reason, |