]> git.baikalelectronics.ru Git - kernel.git/commitdiff
selftests: fib_rule_tests: use pre-defined DEV_ADDR
authorHangbin Liu <liuhangbin@gmail.com>
Tue, 21 May 2019 06:40:47 +0000 (14:40 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 May 2019 20:44:17 +0000 (13:44 -0700)
DEV_ADDR is defined but not used. Use it in address setting.
Do the same with IPv6 for consistency.

Reported-by: David Ahern <dsahern@gmail.com>
Fixes: fc82d93e57e3 ("selftests: fib_rule_tests: fix local IPv4 address typo")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/fib_rule_tests.sh

index 617321d3b8013b010200fcd0863e1654d8666bcc..a93e6b690e068ac957e11da3581118ff1b519f8b 100755 (executable)
@@ -15,6 +15,7 @@ GW_IP6=2001:db8:1::2
 SRC_IP6=2001:db8:1::3
 
 DEV_ADDR=192.51.100.1
+DEV_ADDR6=2001:db8:1::1
 DEV=dummy0
 
 log_test()
@@ -55,8 +56,8 @@ setup()
 
        $IP link add dummy0 type dummy
        $IP link set dev dummy0 up
-       $IP address add 192.51.100.1/24 dev dummy0
-       $IP -6 address add 2001:db8:1::1/64 dev dummy0
+       $IP address add $DEV_ADDR/24 dev dummy0
+       $IP -6 address add $DEV_ADDR6/64 dev dummy0
 
        set +e
 }