summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2020-12-15 01:13:32 +0900
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-12-16 14:28:17 +0100
commita35a2162e6791c0d5a89498f0e348004ea1a1eea (patch)
tree626e35a9a7c62f43fdfa12ceaeac3c073e7c8df2
parentcd0c740468106f8dfff783fb3d93b73d1cd18a95 (diff)
downloadsystemd-a35a2162e6791c0d5a89498f0e348004ea1a1eea.tar.gz
core: detect_container() may return negative errno
(cherry picked from commit bcdb3b7d5076cf6ad17cb70df8db22d876880ada) (cherry picked from commit aca0b4339b3966836fcdcd9c488c45c183804dcc)
-rw-r--r--src/core/bpf-firewall.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/bpf-firewall.c b/src/core/bpf-firewall.c
index 303751858b..5874541575 100644
--- a/src/core/bpf-firewall.c
+++ b/src/core/bpf-firewall.c
@@ -898,7 +898,7 @@ void emit_bpf_firewall_warning(Unit *u) {
static bool warned = false;
if (!warned) {
- bool quiet = bpf_firewall_unsupported_reason == -EPERM && detect_container();
+ bool quiet = bpf_firewall_unsupported_reason == -EPERM && detect_container() > 0;
log_unit_full_errno(u, quiet ? LOG_DEBUG : LOG_WARNING, bpf_firewall_unsupported_reason,
"unit configures an IP firewall, but %s.\n"