bpf: do not use structured initialization for bpf_attr
authorLuca Boccassi <bluca@debian.org>
Sun, 10 Jan 2021 15:36:31 +0000 (15:36 +0000)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 2 Feb 2021 16:35:23 +0000 (17:35 +0100)
commit247c055f54bcc23c3d038d88862ff1549401b40d
treeb6b7b9438a2bc77c40adfaaaf281a742cffd18ec
parent2c380119f8721a76c4237589b2b18bf8d1829c58
bpf: do not use structured initialization for bpf_attr

It looks like zero'ing the struct is not enough, and with some level
of optimizations there is still non-zero padding left over.
Switch to member-by-member initialization. Also convert all remaining
bpf_attr variables in other files.

(cherry picked from commit 9ca600e2bfacc52a65c89f3485723b2c27394e55)
(cherry picked from commit 95ee2c6b481b7a1f953cb720c35df568b7a6cb70)
src/core/bpf-firewall.c
src/shared/bpf-program.c
src/test/test-bpf-firewall.c