提交 e9255c28 编写于 作者: I Ido Schimmel 提交者: Greg Kroah-Hartman

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: NIdo Schimmel <idosch@mellanox.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Signed-off-by: NSasha Levin <sashal@kernel.org>
上级 0c596ab0
#!/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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册