linux-stable/tools/testing/selftests/net
Riccardo Paolo Bestetti 313c502fa3 ipv4: fix bind address validity regression tests
Commit 8ff978b8b2 ("ipv4/raw: support binding to nonlocal addresses")
introduces support for binding to nonlocal addresses, as well as some
basic test coverage for some of the related cases.

Commit b4a028c4d0 ("ipv4: ping: fix bind address validity check")
fixes a regression which incorrectly removed some checks for bind
address validation. In addition, it introduces regression tests for
those specific checks. However, those regression tests are defective, in
that they perform the tests using an incorrect combination of bind
flags. As a result, those tests fail when they should succeed.

This commit introduces additional regression tests for nonlocal binding
and fixes the defective regression tests. It also introduces new
set_sysctl calls for the ipv4_bind test group, as to perform the ICMP
binding tests it is necessary to allow ICMP socket creation by setting
the net.ipv4.ping_group_range knob.

Fixes: b4a028c4d0 ("ipv4: ping: fix bind address validity check")
Reported-by: Riccardo Paolo Bestetti <pbl@bestov.io>
Signed-off-by: Riccardo Paolo Bestetti <pbl@bestov.io>
Signed-off-by: David S. Miller <davem@davemloft.net>
2022-06-20 09:58:12 +01:00
..
af_unix af_unix: Support POLLPRI for OOB. 2022-03-18 13:30:52 +00:00
bpf selftests net: fix bpf build error 2022-06-07 13:19:51 +02:00
forwarding Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-05-19 11:23:59 -07:00
mptcp selftests: mptcp: add MP_FAIL reset testcase 2022-05-19 20:05:07 -07:00
.gitignore Revert "net: Add a second bind table hashed by port and address" 2022-06-16 11:07:59 -07:00
Makefile Revert "net: Add a second bind table hashed by port and address" 2022-06-16 11:07:59 -07:00
altnames.sh selftest: net: fix typo in altname test 2021-09-12 10:48:26 +01:00
amt.sh selftests: set amt.sh executable 2022-01-05 10:27:19 -08:00
arp_ndisc_evict_nocarrier.sh selftests: net: add arp_ndisc_evict_nocarrier 2021-11-01 19:57:15 -07:00
bareudp.sh selftests: set conf.all.rp_filter=0 in bareudp.sh 2020-11-12 16:14:38 -08:00
cmsg_ipv6.sh selftests: net: basic test for IPV6_2292* 2022-02-17 14:22:09 +00:00
cmsg_sender.c selftests: net: fix array_size.cocci warning 2022-03-17 15:21:16 +01:00
cmsg_so_mark.sh selftests: net: cmsg_so_mark: test with SO_MARK set by setsockopt 2022-02-10 15:04:51 +00:00
cmsg_time.sh selftests: net: test standard socket cmsgs across UDP and ICMP sockets 2022-02-10 15:04:52 +00:00
config Revert "selftests: net: Add tls config dependency for tls selftests" 2022-03-28 16:15:54 -07:00
devlink_port_split.py selftests: net: devlink_port_split: check devlink returned an element before dereferencing it 2021-06-28 16:14:38 -07:00
drop_monitor_tests.sh selftests: net: Add drop monitor test 2020-09-30 18:01:26 -07:00
fcnal-test.sh ipv4: fix bind address validity regression tests 2022-06-20 09:58:12 +01:00
fib-onlink-tests.sh
fib_nexthop_multiprefix.sh
fib_nexthops.sh selftests: fib_nexthops: Make ping timeout configurable 2022-05-20 17:21:37 -07:00
fib_rule_tests.sh selftests: net: fib_rule_tests: add support to select a test to run 2022-04-13 12:19:48 +01:00
fib_tests.sh selftests: fib_test: Add a test case for IPv4 broadcast neighbours 2022-02-21 11:44:30 +00:00
fin_ack_lat.c
fin_ack_lat.sh
gre_gso.sh selftests: net: switch to socat in the GSO GRE test 2021-11-12 19:59:01 -08:00
gro.c Networking changes for 5.17. 2022-01-10 19:06:09 -08:00
gro.sh selftests/net: allow GRO coalesce test on veth 2021-08-26 12:03:49 +01:00
hwtstamp_config.c
icmp.sh selftests/net: Add icmp.sh for testing ICMP dummy address responses 2021-06-18 12:13:24 -07:00
icmp_redirect.sh selftests: icmp_redirect: pass xfail=0 to log_test() 2021-12-12 12:56:41 +00:00
in_netns.sh
ioam6.sh Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-10-14 16:50:14 -07:00
ioam6_parser.c selftests: net: ioam: expect support for Queue depth data 2022-01-21 19:26:39 -08:00
ip6_gre_headroom.sh
ip_defrag.c
ip_defrag.sh
ipsec.c selftests/net: remove ARRAY_SIZE define from individual tests 2021-12-10 17:50:57 -07:00
ipv6_flowlabel.c
ipv6_flowlabel.sh
ipv6_flowlabel_mgr.c
l2tp.sh
msg_zerocopy.c selftests/net: relax cpu affinity requirement in msg_zerocopy test 2020-08-05 12:25:35 -07:00
msg_zerocopy.sh
ndisc_unsolicited_na_test.sh net/ipv6: Expand and rename accept_unsolicited_na to accept_untracked_na 2022-05-31 11:36:57 +02:00
netdevice.sh
nettest.c ipv4/raw: support binding to nonlocal addresses 2021-11-17 20:21:52 -08:00
pmtu.sh selftest: net: Test IPv4 PMTU exceptions with DSCP and ECN 2022-03-18 14:06:45 -07:00
psock_fanout.c selftests: net: fix array_size.cocci warning 2022-03-17 15:21:16 +01:00
psock_lib.h
psock_snd.c selftests/net: enable lo.accept_local in psock_snd test 2022-05-25 21:58:35 -07:00
psock_snd.sh selftests/net: remove min gso test in packet_snd 2021-08-02 10:34:04 +01:00
psock_tpacket.c
reuseaddr_conflict.c
reuseaddr_ports_exhausted.c selftests/net: fix warnings on reuseaddr_ports_exhausted 2021-03-16 15:01:21 -07:00
reuseaddr_ports_exhausted.sh
reuseport_addr_any.c
reuseport_addr_any.sh
reuseport_bpf.c selftests/net: remove ARRAY_SIZE define from individual tests 2021-12-10 17:50:57 -07:00
reuseport_bpf_cpu.c
reuseport_bpf_numa.c selftests: net: fix array_size.cocci warning 2022-03-07 12:23:27 +00:00
reuseport_dualstack.c
route_localnet.sh
rtnetlink.sh selftests: rtnetlink: Use more sensible tos values 2022-02-03 19:11:21 -08:00
run_afpackettests selftests/net: Use kselftest skip code for skipped tests 2021-08-24 16:49:09 -07:00
run_netsocktests
rxtimestamp.c selftests/net: remove ARRAY_SIZE define from individual tests 2021-12-10 17:50:57 -07:00
rxtimestamp.sh
settings kselftests/net: adapt the timeout to the largest runtime 2022-01-13 12:53:22 +00:00
setup_loopback.sh selftests/net: allow GRO coalesce test on veth 2021-08-26 12:03:49 +01:00
setup_veth.sh selftests/net: allow GRO coalesce test on veth 2021-08-26 12:03:49 +01:00
so_netns_cookie.c tools/testing: add a selftest for SO_NETNS_COOKIE 2021-06-24 11:13:05 -07:00
so_txtime.c selftests/net: so_txtime: usage(): fix documentation of default clock 2022-05-03 13:18:26 +02:00
so_txtime.sh selftests/net: so_txtime multi-host support 2021-03-31 17:48:21 -07:00
socket.c selftests/net: remove ARRAY_SIZE define from individual tests 2021-12-10 17:50:57 -07:00
srv6_end_dt4_l3vpn_test.sh selftests/net: Use kselftest skip code for skipped tests 2021-08-24 16:49:09 -07:00
srv6_end_dt6_l3vpn_test.sh selftests/net: Use kselftest skip code for skipped tests 2021-08-24 16:49:09 -07:00
srv6_end_dt46_l3vpn_test.sh selftests/net: Use kselftest skip code for skipped tests 2021-08-24 16:49:09 -07:00
stress_reuseport_listen.c net: selftests: Stress reuseport listen 2022-05-12 16:52:18 -07:00
stress_reuseport_listen.sh net: selftests: Stress reuseport listen 2022-05-12 16:52:18 -07:00
tcp_fastopen_backup_key.c selftests/net: remove ARRAY_SIZE define from individual tests 2021-12-10 17:50:57 -07:00
tcp_fastopen_backup_key.sh
tcp_inq.c
tcp_mmap.c selftests: net: tcp_mmap: Use huge pages in receive path 2020-08-20 16:14:53 -07:00
test_blackhole_dev.sh
test_bpf.sh
test_vxlan_fdb_changelink.sh
test_vxlan_under_vrf.sh selftests: test_vxlan_under_vrf: Fix broken test case 2022-03-25 17:00:11 -07:00
test_vxlan_vnifiltering.sh selftests: add new tests for vxlan vnifiltering 2022-03-01 08:38:02 +00:00
timestamping.c selftests/net: timestamping: Fix bind_phc check 2022-01-31 11:44:04 +00:00
tls.c selftests: tls: skip cmsg_to_pipe tests with TLS=n 2022-03-26 14:15:16 -07:00
toeplitz.c selftests: net: fix array_size.cocci warning 2022-03-17 15:21:16 +01:00
toeplitz.sh selftests/net: toeplitz test 2021-08-05 13:14:09 +01:00
toeplitz_client.sh selftests/net: toeplitz test 2021-08-05 13:14:09 +01:00
traceroute.sh
txring_overwrite.c
txtimestamp.c selftests: net: change fprintf format specifiers 2022-03-21 16:37:54 -07:00
txtimestamp.sh
udpgro.sh selftests: fix the return value for UDP GRO test 2021-01-05 16:59:21 -08:00
udpgro_bench.sh
udpgro_frglist.sh selftests net: add UDP GRO fraglist + bpf self-tests 2022-05-09 10:48:49 +01:00
udpgro_fwd.sh selftests: net: udpgro_fwd.sh: explicitly checking the available ping feature 2021-12-31 18:36:41 -08:00
udpgso.c selftests: Calculate udpgso segment count without header adjustment 2021-12-23 19:20:06 -08:00
udpgso.sh
udpgso_bench.sh
udpgso_bench_rx.c selftests/net: udpgso_bench_rx: fix port argument 2021-11-11 12:24:26 +00:00
udpgso_bench_tx.c selftests/net: udpgso_bench_tx: fix dst ip argument 2021-12-29 17:29:50 -08:00
unicast_extensions.sh selftests/net: Use kselftest skip code for skipped tests 2021-08-24 16:49:09 -07:00
veth.sh selftests: net: veth: add tests for set_channel 2021-07-20 06:11:18 -07:00
vrf-xfrm-tests.sh
vrf_route_leaking.sh selftests: Add VRF route leaking tests 2020-10-14 17:14:28 -07:00
vrf_strict_mode_test.sh selftests: net: vrf_strict_mode_test: add support to select a test to run 2022-05-02 10:48:29 +02:00
xfrm_policy.sh xfrm: Fix wraparound in xfrm_policy_addr_delta() 2021-01-04 10:35:09 +01:00