bpf: zero bpf_attr before initialization
authorLuca Boccassi <bluca@debian.org>
Fri, 8 Jan 2021 23:47:03 +0000 (23:47 +0000)
committerLennart Poettering <lennart@poettering.net>
Sat, 9 Jan 2021 16:35:38 +0000 (17:35 +0100)
commit28abf5ad3483a417d3d4de561533d282493a7f2a
treee708aee5c80556a6e54894ca8cbe12f372fd9edb
parent91efc847dc401c32501400763e207158ce5a9bc3
bpf: zero bpf_attr before initialization

When building with Clang and using structured initialization, the
bpf_attr union is not zero-padded, so the kernel misdetects it as
an unsupported extension.
zero it until Clang's behaviour matches GCC. Do not skip the test
on Github Actions anymore.
src/shared/bpf-program.c
src/test/test-bpf-firewall.c