diff options
author | Hans Schultz <schultz.hans@gmail.com> | 2022-02-23 11:16:50 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-02-23 12:52:34 +0000 |
commit | b2b681a412517bf477238de62b1d227361fa04fe (patch) | |
tree | 2d0066ba1b564b2eaef5147b13008dfa24f43ddb /tools/testing/selftests/net/forwarding/lib.sh | |
parent | 34ea415f927e7fb8e0d4e17c3c16aa3bb2510932 (diff) |
selftests: forwarding: tests of locked port feature
These tests check that the basic locked port feature works, so that
no 'host' can communicate (ping) through a locked port unless the
MAC address of the 'host' interface is in the forwarding database of
the bridge.
Signed-off-by: Hans Schultz <schultz.hans+netdev@gmail.com>
Acked-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/testing/selftests/net/forwarding/lib.sh')
-rw-r--r-- | tools/testing/selftests/net/forwarding/lib.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh index e7e434a4758b..159afc7f0979 100644 --- a/tools/testing/selftests/net/forwarding/lib.sh +++ b/tools/testing/selftests/net/forwarding/lib.sh @@ -126,6 +126,14 @@ check_ethtool_lanes_support() fi } +check_locked_port_support() +{ + if ! bridge -d link show | grep -q " locked"; then + echo "SKIP: iproute2 too old; Locked port feature not supported." + return $ksft_skip + fi +} + if [[ "$(id -u)" -ne 0 ]]; then echo "SKIP: need root privileges" exit $ksft_skip |