selftests/bpf: Fix misaligned memory access in queue_stack_map test
authorAndrii Nakryiko <andrii@kernel.org>
Wed, 24 Nov 2021 00:23:22 +0000 (16:23 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 25 Nov 2021 23:15:03 +0000 (00:15 +0100)
commite2e0d90c550a2588ebed7aa2753adaac0f633989
tree43764dd331642b2be4421090cfbb4db4d38247f2
parent6c4dedb7550aafd094f7d803668fd039545f4e57
selftests/bpf: Fix misaligned memory access in queue_stack_map test

Copy over iphdr into a local variable before accessing 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-11-andrii@kernel.org
tools/testing/selftests/bpf/prog_tests/queue_stack_map.c