selftests: fib rule: Make 'getmatch' and 'match' local variables
authorGuillaume Nault <gnault@redhat.com>
Mon, 31 Jan 2022 15:42:01 +0000 (16:42 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 1 Feb 2022 14:14:47 +0000 (14:14 +0000)
Let's restrict the scope of these variables to avoid possible
interferences.

Signed-off-by: Guillaume Nault <gnault@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/fib_rule_tests.sh

index 43ea840..f04f337 100755 (executable)
@@ -115,6 +115,9 @@ fib_rule6_test_match_n_redirect()
 
 fib_rule6_test()
 {
+       local getmatch
+       local match
+
        # setup the fib rule redirect route
        $IP -6 route add table $RTABLE default via $GW_IP6 dev $DEV onlink
 
@@ -184,6 +187,9 @@ fib_rule4_test_match_n_redirect()
 
 fib_rule4_test()
 {
+       local getmatch
+       local match
+
        # setup the fib rule redirect route
        $IP route add table $RTABLE default via $GW_IP4 dev $DEV onlink