Commit f5a9dd58 authored by Nikolay Aleksandrov's avatar Nikolay Aleksandrov Committed by Jakub Kicinski

selftests: net: bridge: add test for vlan_filtering dependency

Add a test for dependency of mcast_vlan_snooping on vlan_filtering. If
vlan_filtering gets disabled, then mcast_vlan_snooping must be
automatically disabled as well.

TEST: Disable multicast vlan snooping when vlan filtering is disabled   [ OK ]
Signed-off-by: default avatarNikolay Aleksandrov <nikolay@nvidia.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 2cd67a4e
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
ALL_TESTS="vlmc_control_test vlmc_querier_test vlmc_igmp_mld_version_test \ ALL_TESTS="vlmc_control_test vlmc_querier_test vlmc_igmp_mld_version_test \
vlmc_last_member_test vlmc_startup_query_test vlmc_membership_test \ vlmc_last_member_test vlmc_startup_query_test vlmc_membership_test \
vlmc_querier_intvl_test vlmc_query_intvl_test vlmc_query_response_intvl_test \ vlmc_querier_intvl_test vlmc_query_intvl_test vlmc_query_response_intvl_test \
vlmc_router_port_test" vlmc_router_port_test vlmc_filtering_test"
NUM_NETIFS=4 NUM_NETIFS=4
CHECK_TC="yes" CHECK_TC="yes"
TEST_GROUP="239.10.10.10" TEST_GROUP="239.10.10.10"
...@@ -523,6 +523,16 @@ vlmc_router_port_test() ...@@ -523,6 +523,16 @@ vlmc_router_port_test()
bridge vlan set vid 10 dev $swp1 mcast_router 1 bridge vlan set vid 10 dev $swp1 mcast_router 1
} }
vlmc_filtering_test()
{
RET=0
ip link set dev br0 type bridge vlan_filtering 0
ip -j -d link show dev bridge | \
jq -e "select(.[0].linkinfo.info_data.mcast_vlan_snooping == 1)" &>/dev/null
check_fail $? "Vlan filtering is disabled but multicast vlan snooping is still enabled"
log_test "Disable multicast vlan snooping when vlan filtering is disabled"
}
trap cleanup EXIT trap cleanup EXIT
setup_prepare setup_prepare
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment