Commit 65bfc146 authored by Nikolay Aleksandrov's avatar Nikolay Aleksandrov Committed by Jakub Kicinski

selftests: net: bridge: add test for igmpv3 exc -> to_exclude report

The test checks for the following case:
    state          report        result                  action
  EXCLUDE (X,Y)  TO_EX (A)     EXCLUDE (A-Y,Y*A)        (A-X-Y)=Group Timer
                                                        Delete (X-A)
                                                        Delete (Y-A)
                                                        Send Q(G,A-Y)
                                                        Group Timer=GMI
Signed-off-by: default avatarNikolay Aleksandrov <nikolay@nvidia.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 7b4f7138
......@@ -3,7 +3,7 @@
ALL_TESTS="v2reportleave_test v3include_test v3inc_allow_test v3inc_is_include_test \
v3inc_is_exclude_test v3inc_to_exclude_test v3exc_allow_test v3exc_is_include_test \
v3exc_is_exclude_test"
v3exc_is_exclude_test v3exc_to_exclude_test"
NUM_NETIFS=4
CHECK_TC="yes"
TEST_GROUP="239.10.10.10"
......@@ -487,6 +487,34 @@ v3exc_is_exclude_test()
v3cleanup $swp1 $TEST_GROUP
}
v3exc_to_exclude_test()
{
RET=0
local X=("192.0.2.1" "192.0.2.30")
local Y=("192.0.2.20")
v3exclude_prepare $h1 $ALL_MAC $ALL_GROUP
ip link set dev br0 type bridge mcast_last_member_interval 500
check_err $? "Could not change mcast_last_member_interval to 5s"
$MZ $h1 -c 1 -b $ALL_MAC -B $ALL_GROUP -t ip "proto=2,p=$MZPKT_TO_EXC" -q
sleep 1
check_sg_entries "to_exclude" "${X[@]}" "${Y[@]}"
check_sg_state 0 "${X[@]}"
check_sg_state 1 "${Y[@]}"
check_sg_fwding 1 "${X[@]}" 192.0.2.100
check_sg_fwding 0 "${Y[@]}"
log_test "IGMPv3 report $TEST_GROUP exclude -> to_exclude"
ip link set dev br0 type bridge mcast_last_member_interval 100
v3cleanup $swp1 $TEST_GROUP
}
trap cleanup EXIT
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