diff options
author | Ido Schimmel <idosch@mellanox.com> | 2019-01-08 16:48:14 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-02-27 10:08:53 +0100 |
commit | e9255c28427083a50d8af0ae68bacb5b70f971d5 (patch) | |
tree | f3191665c3fbb25d213a87aa57e27f0b3869882f /tools | |
parent | 0c596ab039d38e4d7a375cdc92ac76ba62224861 (diff) | |
download | linux-stable-e9255c28427083a50d8af0ae68bacb5b70f971d5.tar.gz linux-stable-e9255c28427083a50d8af0ae68bacb5b70f971d5.tar.bz2 linux-stable-e9255c28427083a50d8af0ae68bacb5b70f971d5.zip |
selftests: forwarding: Add a test for VLAN deletion
[ Upstream commit 4fabf3bf93a194c7fa5288da3e0af37e4b943cf3 ]
Add a VLAN on a bridge port, delete it and make sure the PVID VLAN is
not affected.
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/testing/selftests/net/forwarding/bridge_vlan_aware.sh | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/tools/testing/selftests/net/forwarding/bridge_vlan_aware.sh b/tools/testing/selftests/net/forwarding/bridge_vlan_aware.sh index d8313d0438b7..04c6431b2bd8 100755 --- a/tools/testing/selftests/net/forwarding/bridge_vlan_aware.sh +++ b/tools/testing/selftests/net/forwarding/bridge_vlan_aware.sh @@ -1,7 +1,7 @@ #!/bin/bash # SPDX-License-Identifier: GPL-2.0 -ALL_TESTS="ping_ipv4 ping_ipv6 learning flooding" +ALL_TESTS="ping_ipv4 ping_ipv6 learning flooding vlan_deletion" NUM_NETIFS=4 CHECK_TC="yes" source lib.sh @@ -96,6 +96,19 @@ flooding() flood_test $swp2 $h1 $h2 } +vlan_deletion() +{ + # Test that the deletion of a VLAN on a bridge port does not affect + # the PVID VLAN + log_info "Add and delete a VLAN on bridge port $swp1" + + bridge vlan add vid 10 dev $swp1 + bridge vlan del vid 10 dev $swp1 + + ping_ipv4 + ping_ipv6 +} + trap cleanup EXIT setup_prepare |