Files
linux/tools/testing/selftests
Ilya Leoshkevich 840aec7a8b selftests/bpf: fix "bind{4, 6} deny specific IP & port" on s390
[ Upstream commit 27df5c7068 ]

"bind4 allow specific IP & port" and "bind6 deny specific IP & port"
fail on s390 because of endianness issue: the 4 IP address bytes are
loaded as a word and compared with a constant, but the value of this
constant should be different on big- and little- endian machines, which
is not the case right now.

Use __bpf_constant_ntohl to generate proper value based on machine
endianness.

Fixes: 1d436885b2 ("selftests/bpf: Selftest for sys_bind post-hooks.")
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-09-21 07:18:28 +02:00
..
2019-06-05 15:06:32 +02:00
2019-02-12 10:58:51 -08:00
2018-05-23 15:24:22 -04:00