selftests: fib_test: Add a test case for IPv4 broadcast neighbours
authorIdo Schimmel <idosch@nvidia.com>
Sat, 19 Feb 2022 15:45:20 +0000 (17:45 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 21 Feb 2022 11:44:30 +0000 (11:44 +0000)
commit25bd462fa42f58ca43c881b486726bb81be5aa2b
tree34d7b07801d3c76b019e3512581bc88d021a78ee
parent0c51e12e218f20b7d976158fdc18019627326f7a
selftests: fib_test: Add a test case for IPv4 broadcast neighbours

Test that resolved neighbours for IPv4 broadcast addresses are
unaffected by the configuration of matching broadcast routes, whereas
unresolved neighbours are invalidated.

Without previous patch:

 # ./fib_tests.sh -t ipv4_bcast_neigh

 IPv4 broadcast neighbour tests
     TEST: Resolved neighbour for broadcast address                      [ OK ]
     TEST: Resolved neighbour for network broadcast address              [ OK ]
     TEST: Unresolved neighbour for broadcast address                    [FAIL]
     TEST: Unresolved neighbour for network broadcast address            [FAIL]

 Tests passed:   2
 Tests failed:   2

With previous patch:

 # ./fib_tests.sh -t ipv4_bcast_neigh

 IPv4 broadcast neighbour tests
     TEST: Resolved neighbour for broadcast address                      [ OK ]
     TEST: Resolved neighbour for network broadcast address              [ OK ]
     TEST: Unresolved neighbour for broadcast address                    [ OK ]
     TEST: Unresolved neighbour for network broadcast address            [ OK ]

 Tests passed:   4
 Tests failed:   0

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/fib_tests.sh