summaryrefslogtreecommitdiff
path: root/src/core/bpf-firewall.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-04-24 13:45:44 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-04-24 14:10:27 +0200
commit4355f1c9da0843708426f5c2c8b85179b934a5c7 (patch)
tree9a1e6ea1ffb0e813af692d802270aa86ee9142c0 /src/core/bpf-firewall.c
parentb1c05b98bfbfd967ddeaad1c7f827153989013b8 (diff)
downloadsystemd-4355f1c9da0843708426f5c2c8b85179b934a5c7.tar.gz
Fix three uses of bogus errno value in logs (and returned value in one case)
Diffstat (limited to 'src/core/bpf-firewall.c')
-rw-r--r--src/core/bpf-firewall.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/bpf-firewall.c b/src/core/bpf-firewall.c
index 22cd8e9158..b830b393b3 100644
--- a/src/core/bpf-firewall.c
+++ b/src/core/bpf-firewall.c
@@ -691,13 +691,14 @@ int bpf_firewall_supported(void) {
1,
BPF_F_NO_PREALLOC);
if (fd < 0) {
- log_debug_errno(r, "Can't allocate BPF LPM TRIE map, BPF firewalling is not supported: %m");
+ log_debug_errno(fd, "Can't allocate BPF LPM TRIE map, BPF firewalling is not supported: %m");
return supported = BPF_FIREWALL_UNSUPPORTED;
}
safe_close(fd);
- if (bpf_program_new(BPF_PROG_TYPE_CGROUP_SKB, &program) < 0) {
+ r = bpf_program_new(BPF_PROG_TYPE_CGROUP_SKB, &program);
+ if (r < 0) {
log_debug_errno(r, "Can't allocate CGROUP SKB BPF program, BPF firewalling is not supported: %m");
return supported = BPF_FIREWALL_UNSUPPORTED;
}