linux/tools/testing/selftests/net
Sowmini Varadhan 4d7b9dc1f3 tools: psock_lib: harden socket filter used by psock tests
The filter added by sock_setfilter is intended to only permit
packets matching the pattern set up by create_payload(), but
we only check the ip_len, and a single test-character in
the IP packet to ensure this condition.

Harden the filter by adding additional constraints so that we only
permit UDP/IPv4 packets that meet the ip_len and test-character
requirements. Include the bpf_asm src as a comment, in case this
needs to be enhanced in the future

Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-01-12 10:23:26 -05:00
..
.gitignore reuseport, bpf: add test case for bpf_get_numa_node_id 2016-10-22 17:05:52 -04:00
Makefile reuseport, bpf: add test case for bpf_get_numa_node_id 2016-10-22 17:05:52 -04:00
config
psock_fanout.c
psock_lib.h tools: psock_lib: harden socket filter used by psock tests 2017-01-12 10:23:26 -05:00
psock_tpacket.c tools: psock_tpacket: block Rx until socket filter has been added and socket has been bound to loopback. 2017-01-05 15:03:41 -05:00
reuseport_bpf.c soreuseport: Fix reuseport_bpf testcase on 32bit architectures 2016-06-06 15:20:16 -07:00
reuseport_bpf_cpu.c
reuseport_bpf_numa.c reuseport, bpf: add test case for bpf_get_numa_node_id 2016-10-22 17:05:52 -04:00
reuseport_dualstack.c
run_afpackettests
run_netsocktests selftests: do not require bash to run netsocktests testcase 2017-01-05 13:19:53 -07:00
socket.c
test_bpf.sh