]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: detect_container() may return negative errno
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 14 Dec 2020 16:13:32 +0000 (01:13 +0900)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 14 Dec 2020 18:35:11 +0000 (19:35 +0100)
src/core/bpf-firewall.c

index 44aa1bfb1e568941cf13b05d18d6352325948027..5952eaf2f73bcbb683720fb5f535ebd6504fed5b 100644 (file)
@@ -893,7 +893,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"