selftests/bpf: Fix misaligned accesses in xdp and xdp_bpf2bpf tests

Similar to previous patch, just copy over necessary struct into local
stack variable before checking its fields.

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20211124002325.1737739-14-andrii@kernel.org
This commit is contained in:
Andrii Nakryiko 2021-11-23 16:23:25 -08:00 • committed by Daniel Borkmann
commit 8f6f41f393
2 changed files with 9 additions and 8 deletions