diff options
author | David S. Miller <davem@davemloft.net> | 2017-08-16 03:20:55 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-08-16 03:21:25 +0300 |
commit | 5d1321a9fca29987c93c6d95c06d8f04e6468835 (patch) | |
tree | 5788ca9462bd19edcef33f2bdff2546cd350399a /tools | |
parent | 7324157b8af19ff797b550b7b1543aa1c9c07b48 (diff) | |
parent | 394f51abb3d04f33fb798f04b16ae6b0491ea4ec (diff) | |
download | linux-5d1321a9fca29987c93c6d95c06d8f04e6468835.tar.xz |
Merge branch 'getroute-no-rtnl'
Florian Westphal says:
====================
ipv4 getroute doesn't assume rtnl lock is held anymore, also make
this true for ipv6, then switch both to DOIT_UNLOCKED.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/testing/selftests/net/rtnetlink.sh | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/tools/testing/selftests/net/rtnetlink.sh b/tools/testing/selftests/net/rtnetlink.sh index 5b04ad912525..84b4acf5baa9 100755 --- a/tools/testing/selftests/net/rtnetlink.sh +++ b/tools/testing/selftests/net/rtnetlink.sh @@ -164,6 +164,37 @@ kci_test_polrouting() echo "PASS: policy routing" } +kci_test_route_get() +{ + ret=0 + + ip route get 127.0.0.1 > /dev/null + check_err $? + ip route get 127.0.0.1 dev "$devdummy" > /dev/null + check_err $? + ip route get ::1 > /dev/null + check_err $? + ip route get fe80::1 dev "$devdummy" > /dev/null + check_err $? + ip route get 127.0.0.1 from 127.0.0.1 oif lo tos 0x1 mark 0x1 > /dev/null + check_err $? + ip route get ::1 from ::1 iif lo oif lo tos 0x1 mark 0x1 > /dev/null + check_err $? + ip addr add dev "$devdummy" 10.23.7.11/24 + check_err $? + ip route get 10.23.7.11 from 10.23.7.12 iif "$devdummy" > /dev/null + check_err $? + ip addr del dev "$devdummy" 10.23.7.11/24 + check_err $? + + if [ $ret -ne 0 ];then + echo "FAIL: route get" + return 1 + fi + + echo "PASS: route get" +} + kci_test_rtnl() { kci_add_dummy @@ -173,6 +204,7 @@ kci_test_rtnl() fi kci_test_polrouting + kci_test_route_get kci_test_tc kci_test_gre kci_test_bridge |