linux/tools/testing/selftests/net
David Ahern 6a4aa53a94 net/ipv6: Allow onlink routes to have a device mismatch if it is the default route
[ Upstream commit 4ed591c8ab ]

The intent of ip6_route_check_nh_onlink is to make sure the gateway
given for an onlink route is not actually on a connected route for
a different interface (e.g., 2001:db8:1::/64 is on dev eth1 and then
an onlink route has a via 2001:db8:1::1 dev eth2). If the gateway
lookup hits the default route then it most likely will be a different
interface than the onlink route which is ok.

Update ip6_route_check_nh_onlink to disregard the device mismatch
if the gateway lookup hits the default route. Turns out the existing
onlink tests are passing because there is no default route or it is
an unreachable default, so update the onlink tests to have a default
route other than unreachable.

Fixes: fc1e64e109 ("net/ipv6: Add support for onlink flag")
Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-04 14:50:52 +01:00
..
forwarding selftests: forwarding: gre_multipath: Update next-hop statistics match criteria 2018-08-07 16:02:30 -07:00
.gitignore selftests/net: add tls to .gitignore 2018-07-26 09:37:21 -07:00
config
fib_rule_tests.sh
fib_tests.sh
fib-onlink-tests.sh net/ipv6: Allow onlink routes to have a device mismatch if it is the default route 2018-11-04 14:50:52 +01:00
in_netns.sh
ip6_gre_headroom.sh
Makefile selftests: add headers_install to lib.mk 2018-09-05 08:12:09 -06:00
msg_zerocopy.c
msg_zerocopy.sh
netdevice.sh
pmtu.sh selftests: pmtu: properly redirect stderr to /dev/null 2018-09-18 19:53:58 -07:00
psock_fanout.c
psock_lib.h
psock_snd.c
psock_snd.sh
psock_tpacket.c
reuseaddr_conflict.c
reuseport_bpf_cpu.c
reuseport_bpf_numa.c
reuseport_bpf.c bpf: do not blindly change rlimit in reuseport net selftest 2018-10-08 10:30:55 +02:00
reuseport_dualstack.c
rtnetlink.sh selftests: rtnetlink.sh explicitly requires bash. 2018-10-11 10:19:46 -07:00
run_afpackettests
run_netsocktests
socket.c
tcp_inq.c
tcp_mmap.c selftest/net: fix protocol family to work for IPv4. 2018-08-02 10:30:12 -07:00
test_bpf.sh
tls.c tls: fix currently broken MSG_PEEK behavior 2018-09-17 08:03:09 -07:00
udpgso_bench_rx.c
udpgso_bench_tx.c
udpgso_bench.sh selftests: udpgso_bench.sh explicitly requires bash 2018-10-11 10:19:46 -07:00
udpgso.c
udpgso.sh