Commit f1425529 authored by Ido Schimmel's avatar Ido Schimmel Committed by Paolo Abeni

selftests: vxlan_mdb: Fix failures with old libnet

Locally generated IP multicast packets (such as the ones used in the
test) do not perform routing and simply egress the bound device.

However, as explained in commit 8bcfb4ae ("selftests: forwarding:
Fix failing tests with old libnet"), old versions of libnet (used by
mausezahn) do not use the "SO_BINDTODEVICE" socket option. Specifically,
the library started using the option for IPv6 sockets in version 1.1.6
and for IPv4 sockets in version 1.2. This explains why on Ubuntu - which
uses version 1.1.6 - the IPv4 overlay tests are failing whereas the IPv6
ones are passing.

Fix by specifying the source and destination MAC of the packets which
will cause mausezahn to use a packet socket instead of an IP socket.

Fixes: 62199e3f ("selftests: net: Add VXLAN MDB test")
Reported-by: default avatarMirsad Todorovac <mirsad.todorovac@alu.unizg.hr>
Closes: https://lore.kernel.org/netdev/5bb50349-196d-4892-8ed2-f37543aa863f@alu.unizg.hr/Tested-by: default avatarMirsad Todorovac <mirsad.todorovac@alu.unizg.hr>
Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
Link: https://lore.kernel.org/r/20240325075030.2379513-1-idosch@nvidia.comSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent 8c05813d
...@@ -1177,6 +1177,7 @@ encap_params_common() ...@@ -1177,6 +1177,7 @@ encap_params_common()
local plen=$1; shift local plen=$1; shift
local enc_ethtype=$1; shift local enc_ethtype=$1; shift
local grp=$1; shift local grp=$1; shift
local grp_dmac=$1; shift
local src=$1; shift local src=$1; shift
local mz=$1; shift local mz=$1; shift
...@@ -1195,11 +1196,11 @@ encap_params_common() ...@@ -1195,11 +1196,11 @@ encap_params_common()
run_cmd "bridge -n $ns1 mdb replace dev vx0 port vx0 grp $grp permanent dst $vtep2_ip src_vni 10020" run_cmd "bridge -n $ns1 mdb replace dev vx0 port vx0 grp $grp permanent dst $vtep2_ip src_vni 10020"
run_cmd "tc -n $ns2 filter replace dev vx0 ingress pref 1 handle 101 proto all flower enc_dst_ip $vtep1_ip action pass" run_cmd "tc -n $ns2 filter replace dev vx0 ingress pref 1 handle 101 proto all flower enc_dst_ip $vtep1_ip action pass"
run_cmd "ip netns exec $ns1 $mz br0.10 -A $src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q" run_cmd "ip netns exec $ns1 $mz br0.10 -a own -b $grp_dmac -A $src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q"
tc_check_packets "$ns2" "dev vx0 ingress" 101 1 tc_check_packets "$ns2" "dev vx0 ingress" 101 1
log_test $? 0 "Destination IP - match" log_test $? 0 "Destination IP - match"
run_cmd "ip netns exec $ns1 $mz br0.20 -A $src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q" run_cmd "ip netns exec $ns1 $mz br0.20 -a own -b $grp_dmac -A $src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q"
tc_check_packets "$ns2" "dev vx0 ingress" 101 1 tc_check_packets "$ns2" "dev vx0 ingress" 101 1
log_test $? 0 "Destination IP - no match" log_test $? 0 "Destination IP - no match"
...@@ -1212,20 +1213,20 @@ encap_params_common() ...@@ -1212,20 +1213,20 @@ encap_params_common()
run_cmd "bridge -n $ns1 mdb replace dev vx0 port vx0 grp $grp permanent dst $vtep1_ip dst_port 1111 src_vni 10020" run_cmd "bridge -n $ns1 mdb replace dev vx0 port vx0 grp $grp permanent dst $vtep1_ip dst_port 1111 src_vni 10020"
run_cmd "tc -n $ns2 filter replace dev veth0 ingress pref 1 handle 101 proto $enc_ethtype flower ip_proto udp dst_port 4789 action pass" run_cmd "tc -n $ns2 filter replace dev veth0 ingress pref 1 handle 101 proto $enc_ethtype flower ip_proto udp dst_port 4789 action pass"
run_cmd "ip netns exec $ns1 $mz br0.10 -A $src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q" run_cmd "ip netns exec $ns1 $mz br0.10 -a own -b $grp_dmac -A $src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q"
tc_check_packets "$ns2" "dev veth0 ingress" 101 1 tc_check_packets "$ns2" "dev veth0 ingress" 101 1
log_test $? 0 "Default destination port - match" log_test $? 0 "Default destination port - match"
run_cmd "ip netns exec $ns1 $mz br0.20 -A $src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q" run_cmd "ip netns exec $ns1 $mz br0.20 -a own -b $grp_dmac -A $src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q"
tc_check_packets "$ns2" "dev veth0 ingress" 101 1 tc_check_packets "$ns2" "dev veth0 ingress" 101 1
log_test $? 0 "Default destination port - no match" log_test $? 0 "Default destination port - no match"
run_cmd "tc -n $ns2 filter replace dev veth0 ingress pref 1 handle 101 proto $enc_ethtype flower ip_proto udp dst_port 1111 action pass" run_cmd "tc -n $ns2 filter replace dev veth0 ingress pref 1 handle 101 proto $enc_ethtype flower ip_proto udp dst_port 1111 action pass"
run_cmd "ip netns exec $ns1 $mz br0.20 -A $src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q" run_cmd "ip netns exec $ns1 $mz br0.20 -a own -b $grp_dmac -A $src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q"
tc_check_packets "$ns2" "dev veth0 ingress" 101 1 tc_check_packets "$ns2" "dev veth0 ingress" 101 1
log_test $? 0 "Non-default destination port - match" log_test $? 0 "Non-default destination port - match"
run_cmd "ip netns exec $ns1 $mz br0.10 -A $src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q" run_cmd "ip netns exec $ns1 $mz br0.10 -a own -b $grp_dmac -A $src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q"
tc_check_packets "$ns2" "dev veth0 ingress" 101 1 tc_check_packets "$ns2" "dev veth0 ingress" 101 1
log_test $? 0 "Non-default destination port - no match" log_test $? 0 "Non-default destination port - no match"
...@@ -1238,11 +1239,11 @@ encap_params_common() ...@@ -1238,11 +1239,11 @@ encap_params_common()
run_cmd "bridge -n $ns1 mdb replace dev vx0 port vx0 grp $grp permanent dst $vtep1_ip src_vni 10020" run_cmd "bridge -n $ns1 mdb replace dev vx0 port vx0 grp $grp permanent dst $vtep1_ip src_vni 10020"
run_cmd "tc -n $ns2 filter replace dev vx0 ingress pref 1 handle 101 proto all flower enc_key_id 10010 action pass" run_cmd "tc -n $ns2 filter replace dev vx0 ingress pref 1 handle 101 proto all flower enc_key_id 10010 action pass"
run_cmd "ip netns exec $ns1 $mz br0.10 -A $src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q" run_cmd "ip netns exec $ns1 $mz br0.10 -a own -b $grp_dmac -A $src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q"
tc_check_packets "$ns2" "dev vx0 ingress" 101 1 tc_check_packets "$ns2" "dev vx0 ingress" 101 1
log_test $? 0 "Default destination VNI - match" log_test $? 0 "Default destination VNI - match"
run_cmd "ip netns exec $ns1 $mz br0.20 -A $src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q" run_cmd "ip netns exec $ns1 $mz br0.20 -a own -b $grp_dmac -A $src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q"
tc_check_packets "$ns2" "dev vx0 ingress" 101 1 tc_check_packets "$ns2" "dev vx0 ingress" 101 1
log_test $? 0 "Default destination VNI - no match" log_test $? 0 "Default destination VNI - no match"
...@@ -1250,11 +1251,11 @@ encap_params_common() ...@@ -1250,11 +1251,11 @@ encap_params_common()
run_cmd "bridge -n $ns1 mdb replace dev vx0 port vx0 grp $grp permanent dst $vtep1_ip vni 10010 src_vni 10020" run_cmd "bridge -n $ns1 mdb replace dev vx0 port vx0 grp $grp permanent dst $vtep1_ip vni 10010 src_vni 10020"
run_cmd "tc -n $ns2 filter replace dev vx0 ingress pref 1 handle 101 proto all flower enc_key_id 10020 action pass" run_cmd "tc -n $ns2 filter replace dev vx0 ingress pref 1 handle 101 proto all flower enc_key_id 10020 action pass"
run_cmd "ip netns exec $ns1 $mz br0.10 -A $src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q" run_cmd "ip netns exec $ns1 $mz br0.10 -a own -b $grp_dmac -A $src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q"
tc_check_packets "$ns2" "dev vx0 ingress" 101 1 tc_check_packets "$ns2" "dev vx0 ingress" 101 1
log_test $? 0 "Non-default destination VNI - match" log_test $? 0 "Non-default destination VNI - match"
run_cmd "ip netns exec $ns1 $mz br0.20 -A $src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q" run_cmd "ip netns exec $ns1 $mz br0.20 -a own -b $grp_dmac -A $src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q"
tc_check_packets "$ns2" "dev vx0 ingress" 101 1 tc_check_packets "$ns2" "dev vx0 ingress" 101 1
log_test $? 0 "Non-default destination VNI - no match" log_test $? 0 "Non-default destination VNI - no match"
...@@ -1272,6 +1273,7 @@ encap_params_ipv4_ipv4() ...@@ -1272,6 +1273,7 @@ encap_params_ipv4_ipv4()
local plen=32 local plen=32
local enc_ethtype="ip" local enc_ethtype="ip"
local grp=239.1.1.1 local grp=239.1.1.1
local grp_dmac=01:00:5e:01:01:01
local src=192.0.2.129 local src=192.0.2.129
echo echo
...@@ -1279,7 +1281,7 @@ encap_params_ipv4_ipv4() ...@@ -1279,7 +1281,7 @@ encap_params_ipv4_ipv4()
echo "------------------------------------------------------------------" echo "------------------------------------------------------------------"
encap_params_common $ns1 $ns2 $vtep1_ip $vtep2_ip $plen $enc_ethtype \ encap_params_common $ns1 $ns2 $vtep1_ip $vtep2_ip $plen $enc_ethtype \
$grp $src "mausezahn" $grp $grp_dmac $src "mausezahn"
} }
encap_params_ipv6_ipv4() encap_params_ipv6_ipv4()
...@@ -1291,6 +1293,7 @@ encap_params_ipv6_ipv4() ...@@ -1291,6 +1293,7 @@ encap_params_ipv6_ipv4()
local plen=32 local plen=32
local enc_ethtype="ip" local enc_ethtype="ip"
local grp=ff0e::1 local grp=ff0e::1
local grp_dmac=33:33:00:00:00:01
local src=2001:db8:100::1 local src=2001:db8:100::1
echo echo
...@@ -1298,7 +1301,7 @@ encap_params_ipv6_ipv4() ...@@ -1298,7 +1301,7 @@ encap_params_ipv6_ipv4()
echo "------------------------------------------------------------------" echo "------------------------------------------------------------------"
encap_params_common $ns1 $ns2 $vtep1_ip $vtep2_ip $plen $enc_ethtype \ encap_params_common $ns1 $ns2 $vtep1_ip $vtep2_ip $plen $enc_ethtype \
$grp $src "mausezahn -6" $grp $grp_dmac $src "mausezahn -6"
} }
encap_params_ipv4_ipv6() encap_params_ipv4_ipv6()
...@@ -1310,6 +1313,7 @@ encap_params_ipv4_ipv6() ...@@ -1310,6 +1313,7 @@ encap_params_ipv4_ipv6()
local plen=128 local plen=128
local enc_ethtype="ipv6" local enc_ethtype="ipv6"
local grp=239.1.1.1 local grp=239.1.1.1
local grp_dmac=01:00:5e:01:01:01
local src=192.0.2.129 local src=192.0.2.129
echo echo
...@@ -1317,7 +1321,7 @@ encap_params_ipv4_ipv6() ...@@ -1317,7 +1321,7 @@ encap_params_ipv4_ipv6()
echo "------------------------------------------------------------------" echo "------------------------------------------------------------------"
encap_params_common $ns1 $ns2 $vtep1_ip $vtep2_ip $plen $enc_ethtype \ encap_params_common $ns1 $ns2 $vtep1_ip $vtep2_ip $plen $enc_ethtype \
$grp $src "mausezahn" $grp $grp_dmac $src "mausezahn"
} }
encap_params_ipv6_ipv6() encap_params_ipv6_ipv6()
...@@ -1329,6 +1333,7 @@ encap_params_ipv6_ipv6() ...@@ -1329,6 +1333,7 @@ encap_params_ipv6_ipv6()
local plen=128 local plen=128
local enc_ethtype="ipv6" local enc_ethtype="ipv6"
local grp=ff0e::1 local grp=ff0e::1
local grp_dmac=33:33:00:00:00:01
local src=2001:db8:100::1 local src=2001:db8:100::1
echo echo
...@@ -1336,7 +1341,7 @@ encap_params_ipv6_ipv6() ...@@ -1336,7 +1341,7 @@ encap_params_ipv6_ipv6()
echo "------------------------------------------------------------------" echo "------------------------------------------------------------------"
encap_params_common $ns1 $ns2 $vtep1_ip $vtep2_ip $plen $enc_ethtype \ encap_params_common $ns1 $ns2 $vtep1_ip $vtep2_ip $plen $enc_ethtype \
$grp $src "mausezahn -6" $grp $grp_dmac $src "mausezahn -6"
} }
starg_exclude_ir_common() starg_exclude_ir_common()
...@@ -1347,6 +1352,7 @@ starg_exclude_ir_common() ...@@ -1347,6 +1352,7 @@ starg_exclude_ir_common()
local vtep2_ip=$1; shift local vtep2_ip=$1; shift
local plen=$1; shift local plen=$1; shift
local grp=$1; shift local grp=$1; shift
local grp_dmac=$1; shift
local valid_src=$1; shift local valid_src=$1; shift
local invalid_src=$1; shift local invalid_src=$1; shift
local mz=$1; shift local mz=$1; shift
...@@ -1368,14 +1374,14 @@ starg_exclude_ir_common() ...@@ -1368,14 +1374,14 @@ starg_exclude_ir_common()
run_cmd "bridge -n $ns1 mdb replace dev vx0 port vx0 grp $grp permanent filter_mode exclude source_list $invalid_src dst $vtep2_ip src_vni 10010" run_cmd "bridge -n $ns1 mdb replace dev vx0 port vx0 grp $grp permanent filter_mode exclude source_list $invalid_src dst $vtep2_ip src_vni 10010"
# Check that invalid source is not forwarded to any VTEP. # Check that invalid source is not forwarded to any VTEP.
run_cmd "ip netns exec $ns1 $mz br0.10 -A $invalid_src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q" run_cmd "ip netns exec $ns1 $mz br0.10 -a own -b $grp_dmac -A $invalid_src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q"
tc_check_packets "$ns2" "dev vx0 ingress" 101 0 tc_check_packets "$ns2" "dev vx0 ingress" 101 0
log_test $? 0 "Block excluded source - first VTEP" log_test $? 0 "Block excluded source - first VTEP"
tc_check_packets "$ns2" "dev vx0 ingress" 102 0 tc_check_packets "$ns2" "dev vx0 ingress" 102 0
log_test $? 0 "Block excluded source - second VTEP" log_test $? 0 "Block excluded source - second VTEP"
# Check that valid source is forwarded to both VTEPs. # Check that valid source is forwarded to both VTEPs.
run_cmd "ip netns exec $ns1 $mz br0.10 -A $valid_src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q" run_cmd "ip netns exec $ns1 $mz br0.10 -a own -b $grp_dmac -A $valid_src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q"
tc_check_packets "$ns2" "dev vx0 ingress" 101 1 tc_check_packets "$ns2" "dev vx0 ingress" 101 1
log_test $? 0 "Forward valid source - first VTEP" log_test $? 0 "Forward valid source - first VTEP"
tc_check_packets "$ns2" "dev vx0 ingress" 102 1 tc_check_packets "$ns2" "dev vx0 ingress" 102 1
...@@ -1385,14 +1391,14 @@ starg_exclude_ir_common() ...@@ -1385,14 +1391,14 @@ starg_exclude_ir_common()
run_cmd "bridge -n $ns1 mdb del dev vx0 port vx0 grp $grp dst $vtep2_ip src_vni 10010" run_cmd "bridge -n $ns1 mdb del dev vx0 port vx0 grp $grp dst $vtep2_ip src_vni 10010"
# Check that invalid source is not forwarded to any VTEP. # Check that invalid source is not forwarded to any VTEP.
run_cmd "ip netns exec $ns1 $mz br0.10 -A $invalid_src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q" run_cmd "ip netns exec $ns1 $mz br0.10 -a own -b $grp_dmac -A $invalid_src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q"
tc_check_packets "$ns2" "dev vx0 ingress" 101 1 tc_check_packets "$ns2" "dev vx0 ingress" 101 1
log_test $? 0 "Block excluded source after removal - first VTEP" log_test $? 0 "Block excluded source after removal - first VTEP"
tc_check_packets "$ns2" "dev vx0 ingress" 102 1 tc_check_packets "$ns2" "dev vx0 ingress" 102 1
log_test $? 0 "Block excluded source after removal - second VTEP" log_test $? 0 "Block excluded source after removal - second VTEP"
# Check that valid source is forwarded to the remaining VTEP. # Check that valid source is forwarded to the remaining VTEP.
run_cmd "ip netns exec $ns1 $mz br0.10 -A $valid_src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q" run_cmd "ip netns exec $ns1 $mz br0.10 -a own -b $grp_dmac -A $valid_src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q"
tc_check_packets "$ns2" "dev vx0 ingress" 101 2 tc_check_packets "$ns2" "dev vx0 ingress" 101 2
log_test $? 0 "Forward valid source after removal - first VTEP" log_test $? 0 "Forward valid source after removal - first VTEP"
tc_check_packets "$ns2" "dev vx0 ingress" 102 1 tc_check_packets "$ns2" "dev vx0 ingress" 102 1
...@@ -1407,6 +1413,7 @@ starg_exclude_ir_ipv4_ipv4() ...@@ -1407,6 +1413,7 @@ starg_exclude_ir_ipv4_ipv4()
local vtep2_ip=198.51.100.200 local vtep2_ip=198.51.100.200
local plen=32 local plen=32
local grp=239.1.1.1 local grp=239.1.1.1
local grp_dmac=01:00:5e:01:01:01
local valid_src=192.0.2.129 local valid_src=192.0.2.129
local invalid_src=192.0.2.145 local invalid_src=192.0.2.145
...@@ -1415,7 +1422,7 @@ starg_exclude_ir_ipv4_ipv4() ...@@ -1415,7 +1422,7 @@ starg_exclude_ir_ipv4_ipv4()
echo "-------------------------------------------------------------" echo "-------------------------------------------------------------"
starg_exclude_ir_common $ns1 $ns2 $vtep1_ip $vtep2_ip $plen $grp \ starg_exclude_ir_common $ns1 $ns2 $vtep1_ip $vtep2_ip $plen $grp \
$valid_src $invalid_src "mausezahn" $grp_dmac $valid_src $invalid_src "mausezahn"
} }
starg_exclude_ir_ipv6_ipv4() starg_exclude_ir_ipv6_ipv4()
...@@ -1426,6 +1433,7 @@ starg_exclude_ir_ipv6_ipv4() ...@@ -1426,6 +1433,7 @@ starg_exclude_ir_ipv6_ipv4()
local vtep2_ip=198.51.100.200 local vtep2_ip=198.51.100.200
local plen=32 local plen=32
local grp=ff0e::1 local grp=ff0e::1
local grp_dmac=33:33:00:00:00:01
local valid_src=2001:db8:100::1 local valid_src=2001:db8:100::1
local invalid_src=2001:db8:200::1 local invalid_src=2001:db8:200::1
...@@ -1434,7 +1442,7 @@ starg_exclude_ir_ipv6_ipv4() ...@@ -1434,7 +1442,7 @@ starg_exclude_ir_ipv6_ipv4()
echo "-------------------------------------------------------------" echo "-------------------------------------------------------------"
starg_exclude_ir_common $ns1 $ns2 $vtep1_ip $vtep2_ip $plen $grp \ starg_exclude_ir_common $ns1 $ns2 $vtep1_ip $vtep2_ip $plen $grp \
$valid_src $invalid_src "mausezahn -6" $grp_dmac $valid_src $invalid_src "mausezahn -6"
} }
starg_exclude_ir_ipv4_ipv6() starg_exclude_ir_ipv4_ipv6()
...@@ -1445,6 +1453,7 @@ starg_exclude_ir_ipv4_ipv6() ...@@ -1445,6 +1453,7 @@ starg_exclude_ir_ipv4_ipv6()
local vtep2_ip=2001:db8:2000::1 local vtep2_ip=2001:db8:2000::1
local plen=128 local plen=128
local grp=239.1.1.1 local grp=239.1.1.1
local grp_dmac=01:00:5e:01:01:01
local valid_src=192.0.2.129 local valid_src=192.0.2.129
local invalid_src=192.0.2.145 local invalid_src=192.0.2.145
...@@ -1453,7 +1462,7 @@ starg_exclude_ir_ipv4_ipv6() ...@@ -1453,7 +1462,7 @@ starg_exclude_ir_ipv4_ipv6()
echo "-------------------------------------------------------------" echo "-------------------------------------------------------------"
starg_exclude_ir_common $ns1 $ns2 $vtep1_ip $vtep2_ip $plen $grp \ starg_exclude_ir_common $ns1 $ns2 $vtep1_ip $vtep2_ip $plen $grp \
$valid_src $invalid_src "mausezahn" $grp_dmac $valid_src $invalid_src "mausezahn"
} }
starg_exclude_ir_ipv6_ipv6() starg_exclude_ir_ipv6_ipv6()
...@@ -1464,6 +1473,7 @@ starg_exclude_ir_ipv6_ipv6() ...@@ -1464,6 +1473,7 @@ starg_exclude_ir_ipv6_ipv6()
local vtep2_ip=2001:db8:2000::1 local vtep2_ip=2001:db8:2000::1
local plen=128 local plen=128
local grp=ff0e::1 local grp=ff0e::1
local grp_dmac=33:33:00:00:00:01
local valid_src=2001:db8:100::1 local valid_src=2001:db8:100::1
local invalid_src=2001:db8:200::1 local invalid_src=2001:db8:200::1
...@@ -1472,7 +1482,7 @@ starg_exclude_ir_ipv6_ipv6() ...@@ -1472,7 +1482,7 @@ starg_exclude_ir_ipv6_ipv6()
echo "-------------------------------------------------------------" echo "-------------------------------------------------------------"
starg_exclude_ir_common $ns1 $ns2 $vtep1_ip $vtep2_ip $plen $grp \ starg_exclude_ir_common $ns1 $ns2 $vtep1_ip $vtep2_ip $plen $grp \
$valid_src $invalid_src "mausezahn -6" $grp_dmac $valid_src $invalid_src "mausezahn -6"
} }
starg_include_ir_common() starg_include_ir_common()
...@@ -1483,6 +1493,7 @@ starg_include_ir_common() ...@@ -1483,6 +1493,7 @@ starg_include_ir_common()
local vtep2_ip=$1; shift local vtep2_ip=$1; shift
local plen=$1; shift local plen=$1; shift
local grp=$1; shift local grp=$1; shift
local grp_dmac=$1; shift
local valid_src=$1; shift local valid_src=$1; shift
local invalid_src=$1; shift local invalid_src=$1; shift
local mz=$1; shift local mz=$1; shift
...@@ -1504,14 +1515,14 @@ starg_include_ir_common() ...@@ -1504,14 +1515,14 @@ starg_include_ir_common()
run_cmd "bridge -n $ns1 mdb replace dev vx0 port vx0 grp $grp permanent filter_mode include source_list $valid_src dst $vtep2_ip src_vni 10010" run_cmd "bridge -n $ns1 mdb replace dev vx0 port vx0 grp $grp permanent filter_mode include source_list $valid_src dst $vtep2_ip src_vni 10010"
# Check that invalid source is not forwarded to any VTEP. # Check that invalid source is not forwarded to any VTEP.
run_cmd "ip netns exec $ns1 $mz br0.10 -A $invalid_src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q" run_cmd "ip netns exec $ns1 $mz br0.10 -a own -b $grp_dmac -A $invalid_src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q"
tc_check_packets "$ns2" "dev vx0 ingress" 101 0 tc_check_packets "$ns2" "dev vx0 ingress" 101 0
log_test $? 0 "Block excluded source - first VTEP" log_test $? 0 "Block excluded source - first VTEP"
tc_check_packets "$ns2" "dev vx0 ingress" 102 0 tc_check_packets "$ns2" "dev vx0 ingress" 102 0
log_test $? 0 "Block excluded source - second VTEP" log_test $? 0 "Block excluded source - second VTEP"
# Check that valid source is forwarded to both VTEPs. # Check that valid source is forwarded to both VTEPs.
run_cmd "ip netns exec $ns1 $mz br0.10 -A $valid_src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q" run_cmd "ip netns exec $ns1 $mz br0.10 -a own -b $grp_dmac -A $valid_src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q"
tc_check_packets "$ns2" "dev vx0 ingress" 101 1 tc_check_packets "$ns2" "dev vx0 ingress" 101 1
log_test $? 0 "Forward valid source - first VTEP" log_test $? 0 "Forward valid source - first VTEP"
tc_check_packets "$ns2" "dev vx0 ingress" 102 1 tc_check_packets "$ns2" "dev vx0 ingress" 102 1
...@@ -1521,14 +1532,14 @@ starg_include_ir_common() ...@@ -1521,14 +1532,14 @@ starg_include_ir_common()
run_cmd "bridge -n $ns1 mdb del dev vx0 port vx0 grp $grp dst $vtep2_ip src_vni 10010" run_cmd "bridge -n $ns1 mdb del dev vx0 port vx0 grp $grp dst $vtep2_ip src_vni 10010"
# Check that invalid source is not forwarded to any VTEP. # Check that invalid source is not forwarded to any VTEP.
run_cmd "ip netns exec $ns1 $mz br0.10 -A $invalid_src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q" run_cmd "ip netns exec $ns1 $mz br0.10 -a own -b $grp_dmac -A $invalid_src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q"
tc_check_packets "$ns2" "dev vx0 ingress" 101 1 tc_check_packets "$ns2" "dev vx0 ingress" 101 1
log_test $? 0 "Block excluded source after removal - first VTEP" log_test $? 0 "Block excluded source after removal - first VTEP"
tc_check_packets "$ns2" "dev vx0 ingress" 102 1 tc_check_packets "$ns2" "dev vx0 ingress" 102 1
log_test $? 0 "Block excluded source after removal - second VTEP" log_test $? 0 "Block excluded source after removal - second VTEP"
# Check that valid source is forwarded to the remaining VTEP. # Check that valid source is forwarded to the remaining VTEP.
run_cmd "ip netns exec $ns1 $mz br0.10 -A $valid_src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q" run_cmd "ip netns exec $ns1 $mz br0.10 -a own -b $grp_dmac -A $valid_src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q"
tc_check_packets "$ns2" "dev vx0 ingress" 101 2 tc_check_packets "$ns2" "dev vx0 ingress" 101 2
log_test $? 0 "Forward valid source after removal - first VTEP" log_test $? 0 "Forward valid source after removal - first VTEP"
tc_check_packets "$ns2" "dev vx0 ingress" 102 1 tc_check_packets "$ns2" "dev vx0 ingress" 102 1
...@@ -1543,6 +1554,7 @@ starg_include_ir_ipv4_ipv4() ...@@ -1543,6 +1554,7 @@ starg_include_ir_ipv4_ipv4()
local vtep2_ip=198.51.100.200 local vtep2_ip=198.51.100.200
local plen=32 local plen=32
local grp=239.1.1.1 local grp=239.1.1.1
local grp_dmac=01:00:5e:01:01:01
local valid_src=192.0.2.129 local valid_src=192.0.2.129
local invalid_src=192.0.2.145 local invalid_src=192.0.2.145
...@@ -1551,7 +1563,7 @@ starg_include_ir_ipv4_ipv4() ...@@ -1551,7 +1563,7 @@ starg_include_ir_ipv4_ipv4()
echo "-------------------------------------------------------------" echo "-------------------------------------------------------------"
starg_include_ir_common $ns1 $ns2 $vtep1_ip $vtep2_ip $plen $grp \ starg_include_ir_common $ns1 $ns2 $vtep1_ip $vtep2_ip $plen $grp \
$valid_src $invalid_src "mausezahn" $grp_dmac $valid_src $invalid_src "mausezahn"
} }
starg_include_ir_ipv6_ipv4() starg_include_ir_ipv6_ipv4()
...@@ -1562,6 +1574,7 @@ starg_include_ir_ipv6_ipv4() ...@@ -1562,6 +1574,7 @@ starg_include_ir_ipv6_ipv4()
local vtep2_ip=198.51.100.200 local vtep2_ip=198.51.100.200
local plen=32 local plen=32
local grp=ff0e::1 local grp=ff0e::1
local grp_dmac=33:33:00:00:00:01
local valid_src=2001:db8:100::1 local valid_src=2001:db8:100::1
local invalid_src=2001:db8:200::1 local invalid_src=2001:db8:200::1
...@@ -1570,7 +1583,7 @@ starg_include_ir_ipv6_ipv4() ...@@ -1570,7 +1583,7 @@ starg_include_ir_ipv6_ipv4()
echo "-------------------------------------------------------------" echo "-------------------------------------------------------------"
starg_include_ir_common $ns1 $ns2 $vtep1_ip $vtep2_ip $plen $grp \ starg_include_ir_common $ns1 $ns2 $vtep1_ip $vtep2_ip $plen $grp \
$valid_src $invalid_src "mausezahn -6" $grp_dmac $valid_src $invalid_src "mausezahn -6"
} }
starg_include_ir_ipv4_ipv6() starg_include_ir_ipv4_ipv6()
...@@ -1581,6 +1594,7 @@ starg_include_ir_ipv4_ipv6() ...@@ -1581,6 +1594,7 @@ starg_include_ir_ipv4_ipv6()
local vtep2_ip=2001:db8:2000::1 local vtep2_ip=2001:db8:2000::1
local plen=128 local plen=128
local grp=239.1.1.1 local grp=239.1.1.1
local grp_dmac=01:00:5e:01:01:01
local valid_src=192.0.2.129 local valid_src=192.0.2.129
local invalid_src=192.0.2.145 local invalid_src=192.0.2.145
...@@ -1589,7 +1603,7 @@ starg_include_ir_ipv4_ipv6() ...@@ -1589,7 +1603,7 @@ starg_include_ir_ipv4_ipv6()
echo "-------------------------------------------------------------" echo "-------------------------------------------------------------"
starg_include_ir_common $ns1 $ns2 $vtep1_ip $vtep2_ip $plen $grp \ starg_include_ir_common $ns1 $ns2 $vtep1_ip $vtep2_ip $plen $grp \
$valid_src $invalid_src "mausezahn" $grp_dmac $valid_src $invalid_src "mausezahn"
} }
starg_include_ir_ipv6_ipv6() starg_include_ir_ipv6_ipv6()
...@@ -1600,6 +1614,7 @@ starg_include_ir_ipv6_ipv6() ...@@ -1600,6 +1614,7 @@ starg_include_ir_ipv6_ipv6()
local vtep2_ip=2001:db8:2000::1 local vtep2_ip=2001:db8:2000::1
local plen=128 local plen=128
local grp=ff0e::1 local grp=ff0e::1
local grp_dmac=33:33:00:00:00:01
local valid_src=2001:db8:100::1 local valid_src=2001:db8:100::1
local invalid_src=2001:db8:200::1 local invalid_src=2001:db8:200::1
...@@ -1608,7 +1623,7 @@ starg_include_ir_ipv6_ipv6() ...@@ -1608,7 +1623,7 @@ starg_include_ir_ipv6_ipv6()
echo "-------------------------------------------------------------" echo "-------------------------------------------------------------"
starg_include_ir_common $ns1 $ns2 $vtep1_ip $vtep2_ip $plen $grp \ starg_include_ir_common $ns1 $ns2 $vtep1_ip $vtep2_ip $plen $grp \
$valid_src $invalid_src "mausezahn -6" $grp_dmac $valid_src $invalid_src "mausezahn -6"
} }
starg_exclude_p2mp_common() starg_exclude_p2mp_common()
...@@ -1618,6 +1633,7 @@ starg_exclude_p2mp_common() ...@@ -1618,6 +1633,7 @@ starg_exclude_p2mp_common()
local mcast_grp=$1; shift local mcast_grp=$1; shift
local plen=$1; shift local plen=$1; shift
local grp=$1; shift local grp=$1; shift
local grp_dmac=$1; shift
local valid_src=$1; shift local valid_src=$1; shift
local invalid_src=$1; shift local invalid_src=$1; shift
local mz=$1; shift local mz=$1; shift
...@@ -1635,12 +1651,12 @@ starg_exclude_p2mp_common() ...@@ -1635,12 +1651,12 @@ starg_exclude_p2mp_common()
run_cmd "bridge -n $ns1 mdb replace dev vx0 port vx0 grp $grp permanent filter_mode exclude source_list $invalid_src dst $mcast_grp src_vni 10010 via veth0" run_cmd "bridge -n $ns1 mdb replace dev vx0 port vx0 grp $grp permanent filter_mode exclude source_list $invalid_src dst $mcast_grp src_vni 10010 via veth0"
# Check that invalid source is not forwarded. # Check that invalid source is not forwarded.
run_cmd "ip netns exec $ns1 $mz br0.10 -A $invalid_src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q" run_cmd "ip netns exec $ns1 $mz br0.10 -a own -b $grp_dmac -A $invalid_src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q"
tc_check_packets "$ns2" "dev vx0 ingress" 101 0 tc_check_packets "$ns2" "dev vx0 ingress" 101 0
log_test $? 0 "Block excluded source" log_test $? 0 "Block excluded source"
# Check that valid source is forwarded. # Check that valid source is forwarded.
run_cmd "ip netns exec $ns1 $mz br0.10 -A $valid_src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q" run_cmd "ip netns exec $ns1 $mz br0.10 -a own -b $grp_dmac -A $valid_src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q"
tc_check_packets "$ns2" "dev vx0 ingress" 101 1 tc_check_packets "$ns2" "dev vx0 ingress" 101 1
log_test $? 0 "Forward valid source" log_test $? 0 "Forward valid source"
...@@ -1648,7 +1664,7 @@ starg_exclude_p2mp_common() ...@@ -1648,7 +1664,7 @@ starg_exclude_p2mp_common()
run_cmd "ip -n $ns2 address del $mcast_grp/$plen dev veth0" run_cmd "ip -n $ns2 address del $mcast_grp/$plen dev veth0"
# Check that valid source is not received anymore. # Check that valid source is not received anymore.
run_cmd "ip netns exec $ns1 $mz br0.10 -A $valid_src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q" run_cmd "ip netns exec $ns1 $mz br0.10 -a own -b $grp_dmac -A $valid_src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q"
tc_check_packets "$ns2" "dev vx0 ingress" 101 1 tc_check_packets "$ns2" "dev vx0 ingress" 101 1
log_test $? 0 "Receive of valid source after removal from group" log_test $? 0 "Receive of valid source after removal from group"
} }
...@@ -1660,6 +1676,7 @@ starg_exclude_p2mp_ipv4_ipv4() ...@@ -1660,6 +1676,7 @@ starg_exclude_p2mp_ipv4_ipv4()
local mcast_grp=238.1.1.1 local mcast_grp=238.1.1.1
local plen=32 local plen=32
local grp=239.1.1.1 local grp=239.1.1.1
local grp_dmac=01:00:5e:01:01:01
local valid_src=192.0.2.129 local valid_src=192.0.2.129
local invalid_src=192.0.2.145 local invalid_src=192.0.2.145
...@@ -1667,7 +1684,7 @@ starg_exclude_p2mp_ipv4_ipv4() ...@@ -1667,7 +1684,7 @@ starg_exclude_p2mp_ipv4_ipv4()
echo "Data path: (*, G) EXCLUDE - P2MP - IPv4 overlay / IPv4 underlay" echo "Data path: (*, G) EXCLUDE - P2MP - IPv4 overlay / IPv4 underlay"
echo "---------------------------------------------------------------" echo "---------------------------------------------------------------"
starg_exclude_p2mp_common $ns1 $ns2 $mcast_grp $plen $grp \ starg_exclude_p2mp_common $ns1 $ns2 $mcast_grp $plen $grp $grp_dmac \
$valid_src $invalid_src "mausezahn" $valid_src $invalid_src "mausezahn"
} }
...@@ -1678,6 +1695,7 @@ starg_exclude_p2mp_ipv6_ipv4() ...@@ -1678,6 +1695,7 @@ starg_exclude_p2mp_ipv6_ipv4()
local mcast_grp=238.1.1.1 local mcast_grp=238.1.1.1
local plen=32 local plen=32
local grp=ff0e::1 local grp=ff0e::1
local grp_dmac=33:33:00:00:00:01
local valid_src=2001:db8:100::1 local valid_src=2001:db8:100::1
local invalid_src=2001:db8:200::1 local invalid_src=2001:db8:200::1
...@@ -1685,7 +1703,7 @@ starg_exclude_p2mp_ipv6_ipv4() ...@@ -1685,7 +1703,7 @@ starg_exclude_p2mp_ipv6_ipv4()
echo "Data path: (*, G) EXCLUDE - P2MP - IPv6 overlay / IPv4 underlay" echo "Data path: (*, G) EXCLUDE - P2MP - IPv6 overlay / IPv4 underlay"
echo "---------------------------------------------------------------" echo "---------------------------------------------------------------"
starg_exclude_p2mp_common $ns1 $ns2 $mcast_grp $plen $grp \ starg_exclude_p2mp_common $ns1 $ns2 $mcast_grp $plen $grp $grp_dmac \
$valid_src $invalid_src "mausezahn -6" $valid_src $invalid_src "mausezahn -6"
} }
...@@ -1696,6 +1714,7 @@ starg_exclude_p2mp_ipv4_ipv6() ...@@ -1696,6 +1714,7 @@ starg_exclude_p2mp_ipv4_ipv6()
local mcast_grp=ff0e::2 local mcast_grp=ff0e::2
local plen=128 local plen=128
local grp=239.1.1.1 local grp=239.1.1.1
local grp_dmac=01:00:5e:01:01:01
local valid_src=192.0.2.129 local valid_src=192.0.2.129
local invalid_src=192.0.2.145 local invalid_src=192.0.2.145
...@@ -1703,7 +1722,7 @@ starg_exclude_p2mp_ipv4_ipv6() ...@@ -1703,7 +1722,7 @@ starg_exclude_p2mp_ipv4_ipv6()
echo "Data path: (*, G) EXCLUDE - P2MP - IPv4 overlay / IPv6 underlay" echo "Data path: (*, G) EXCLUDE - P2MP - IPv4 overlay / IPv6 underlay"
echo "---------------------------------------------------------------" echo "---------------------------------------------------------------"
starg_exclude_p2mp_common $ns1 $ns2 $mcast_grp $plen $grp \ starg_exclude_p2mp_common $ns1 $ns2 $mcast_grp $plen $grp $grp_dmac \
$valid_src $invalid_src "mausezahn" $valid_src $invalid_src "mausezahn"
} }
...@@ -1714,6 +1733,7 @@ starg_exclude_p2mp_ipv6_ipv6() ...@@ -1714,6 +1733,7 @@ starg_exclude_p2mp_ipv6_ipv6()
local mcast_grp=ff0e::2 local mcast_grp=ff0e::2
local plen=128 local plen=128
local grp=ff0e::1 local grp=ff0e::1
local grp_dmac=33:33:00:00:00:01
local valid_src=2001:db8:100::1 local valid_src=2001:db8:100::1
local invalid_src=2001:db8:200::1 local invalid_src=2001:db8:200::1
...@@ -1721,7 +1741,7 @@ starg_exclude_p2mp_ipv6_ipv6() ...@@ -1721,7 +1741,7 @@ starg_exclude_p2mp_ipv6_ipv6()
echo "Data path: (*, G) EXCLUDE - P2MP - IPv6 overlay / IPv6 underlay" echo "Data path: (*, G) EXCLUDE - P2MP - IPv6 overlay / IPv6 underlay"
echo "---------------------------------------------------------------" echo "---------------------------------------------------------------"
starg_exclude_p2mp_common $ns1 $ns2 $mcast_grp $plen $grp \ starg_exclude_p2mp_common $ns1 $ns2 $mcast_grp $plen $grp $grp_dmac \
$valid_src $invalid_src "mausezahn -6" $valid_src $invalid_src "mausezahn -6"
} }
...@@ -1732,6 +1752,7 @@ starg_include_p2mp_common() ...@@ -1732,6 +1752,7 @@ starg_include_p2mp_common()
local mcast_grp=$1; shift local mcast_grp=$1; shift
local plen=$1; shift local plen=$1; shift
local grp=$1; shift local grp=$1; shift
local grp_dmac=$1; shift
local valid_src=$1; shift local valid_src=$1; shift
local invalid_src=$1; shift local invalid_src=$1; shift
local mz=$1; shift local mz=$1; shift
...@@ -1749,12 +1770,12 @@ starg_include_p2mp_common() ...@@ -1749,12 +1770,12 @@ starg_include_p2mp_common()
run_cmd "bridge -n $ns1 mdb replace dev vx0 port vx0 grp $grp permanent filter_mode include source_list $valid_src dst $mcast_grp src_vni 10010 via veth0" run_cmd "bridge -n $ns1 mdb replace dev vx0 port vx0 grp $grp permanent filter_mode include source_list $valid_src dst $mcast_grp src_vni 10010 via veth0"
# Check that invalid source is not forwarded. # Check that invalid source is not forwarded.
run_cmd "ip netns exec $ns1 $mz br0.10 -A $invalid_src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q" run_cmd "ip netns exec $ns1 $mz br0.10 -a own -b $grp_dmac -A $invalid_src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q"
tc_check_packets "$ns2" "dev vx0 ingress" 101 0 tc_check_packets "$ns2" "dev vx0 ingress" 101 0
log_test $? 0 "Block excluded source" log_test $? 0 "Block excluded source"
# Check that valid source is forwarded. # Check that valid source is forwarded.
run_cmd "ip netns exec $ns1 $mz br0.10 -A $valid_src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q" run_cmd "ip netns exec $ns1 $mz br0.10 -a own -b $grp_dmac -A $valid_src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q"
tc_check_packets "$ns2" "dev vx0 ingress" 101 1 tc_check_packets "$ns2" "dev vx0 ingress" 101 1
log_test $? 0 "Forward valid source" log_test $? 0 "Forward valid source"
...@@ -1762,7 +1783,7 @@ starg_include_p2mp_common() ...@@ -1762,7 +1783,7 @@ starg_include_p2mp_common()
run_cmd "ip -n $ns2 address del $mcast_grp/$plen dev veth0" run_cmd "ip -n $ns2 address del $mcast_grp/$plen dev veth0"
# Check that valid source is not received anymore. # Check that valid source is not received anymore.
run_cmd "ip netns exec $ns1 $mz br0.10 -A $valid_src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q" run_cmd "ip netns exec $ns1 $mz br0.10 -a own -b $grp_dmac -A $valid_src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q"
tc_check_packets "$ns2" "dev vx0 ingress" 101 1 tc_check_packets "$ns2" "dev vx0 ingress" 101 1
log_test $? 0 "Receive of valid source after removal from group" log_test $? 0 "Receive of valid source after removal from group"
} }
...@@ -1774,6 +1795,7 @@ starg_include_p2mp_ipv4_ipv4() ...@@ -1774,6 +1795,7 @@ starg_include_p2mp_ipv4_ipv4()
local mcast_grp=238.1.1.1 local mcast_grp=238.1.1.1
local plen=32 local plen=32
local grp=239.1.1.1 local grp=239.1.1.1
local grp_dmac=01:00:5e:01:01:01
local valid_src=192.0.2.129 local valid_src=192.0.2.129
local invalid_src=192.0.2.145 local invalid_src=192.0.2.145
...@@ -1781,7 +1803,7 @@ starg_include_p2mp_ipv4_ipv4() ...@@ -1781,7 +1803,7 @@ starg_include_p2mp_ipv4_ipv4()
echo "Data path: (*, G) INCLUDE - P2MP - IPv4 overlay / IPv4 underlay" echo "Data path: (*, G) INCLUDE - P2MP - IPv4 overlay / IPv4 underlay"
echo "---------------------------------------------------------------" echo "---------------------------------------------------------------"
starg_include_p2mp_common $ns1 $ns2 $mcast_grp $plen $grp \ starg_include_p2mp_common $ns1 $ns2 $mcast_grp $plen $grp $grp_dmac \
$valid_src $invalid_src "mausezahn" $valid_src $invalid_src "mausezahn"
} }
...@@ -1792,6 +1814,7 @@ starg_include_p2mp_ipv6_ipv4() ...@@ -1792,6 +1814,7 @@ starg_include_p2mp_ipv6_ipv4()
local mcast_grp=238.1.1.1 local mcast_grp=238.1.1.1
local plen=32 local plen=32
local grp=ff0e::1 local grp=ff0e::1
local grp_dmac=33:33:00:00:00:01
local valid_src=2001:db8:100::1 local valid_src=2001:db8:100::1
local invalid_src=2001:db8:200::1 local invalid_src=2001:db8:200::1
...@@ -1799,7 +1822,7 @@ starg_include_p2mp_ipv6_ipv4() ...@@ -1799,7 +1822,7 @@ starg_include_p2mp_ipv6_ipv4()
echo "Data path: (*, G) INCLUDE - P2MP - IPv6 overlay / IPv4 underlay" echo "Data path: (*, G) INCLUDE - P2MP - IPv6 overlay / IPv4 underlay"
echo "---------------------------------------------------------------" echo "---------------------------------------------------------------"
starg_include_p2mp_common $ns1 $ns2 $mcast_grp $plen $grp \ starg_include_p2mp_common $ns1 $ns2 $mcast_grp $plen $grp $grp_dmac \
$valid_src $invalid_src "mausezahn -6" $valid_src $invalid_src "mausezahn -6"
} }
...@@ -1810,6 +1833,7 @@ starg_include_p2mp_ipv4_ipv6() ...@@ -1810,6 +1833,7 @@ starg_include_p2mp_ipv4_ipv6()
local mcast_grp=ff0e::2 local mcast_grp=ff0e::2
local plen=128 local plen=128
local grp=239.1.1.1 local grp=239.1.1.1
local grp_dmac=01:00:5e:01:01:01
local valid_src=192.0.2.129 local valid_src=192.0.2.129
local invalid_src=192.0.2.145 local invalid_src=192.0.2.145
...@@ -1817,7 +1841,7 @@ starg_include_p2mp_ipv4_ipv6() ...@@ -1817,7 +1841,7 @@ starg_include_p2mp_ipv4_ipv6()
echo "Data path: (*, G) INCLUDE - P2MP - IPv4 overlay / IPv6 underlay" echo "Data path: (*, G) INCLUDE - P2MP - IPv4 overlay / IPv6 underlay"
echo "---------------------------------------------------------------" echo "---------------------------------------------------------------"
starg_include_p2mp_common $ns1 $ns2 $mcast_grp $plen $grp \ starg_include_p2mp_common $ns1 $ns2 $mcast_grp $plen $grp $grp_dmac \
$valid_src $invalid_src "mausezahn" $valid_src $invalid_src "mausezahn"
} }
...@@ -1828,6 +1852,7 @@ starg_include_p2mp_ipv6_ipv6() ...@@ -1828,6 +1852,7 @@ starg_include_p2mp_ipv6_ipv6()
local mcast_grp=ff0e::2 local mcast_grp=ff0e::2
local plen=128 local plen=128
local grp=ff0e::1 local grp=ff0e::1
local grp_dmac=33:33:00:00:00:01
local valid_src=2001:db8:100::1 local valid_src=2001:db8:100::1
local invalid_src=2001:db8:200::1 local invalid_src=2001:db8:200::1
...@@ -1835,7 +1860,7 @@ starg_include_p2mp_ipv6_ipv6() ...@@ -1835,7 +1860,7 @@ starg_include_p2mp_ipv6_ipv6()
echo "Data path: (*, G) INCLUDE - P2MP - IPv6 overlay / IPv6 underlay" echo "Data path: (*, G) INCLUDE - P2MP - IPv6 overlay / IPv6 underlay"
echo "---------------------------------------------------------------" echo "---------------------------------------------------------------"
starg_include_p2mp_common $ns1 $ns2 $mcast_grp $plen $grp \ starg_include_p2mp_common $ns1 $ns2 $mcast_grp $plen $grp $grp_dmac \
$valid_src $invalid_src "mausezahn -6" $valid_src $invalid_src "mausezahn -6"
} }
...@@ -1847,6 +1872,7 @@ egress_vni_translation_common() ...@@ -1847,6 +1872,7 @@ egress_vni_translation_common()
local plen=$1; shift local plen=$1; shift
local proto=$1; shift local proto=$1; shift
local grp=$1; shift local grp=$1; shift
local grp_dmac=$1; shift
local src=$1; shift local src=$1; shift
local mz=$1; shift local mz=$1; shift
...@@ -1882,20 +1908,20 @@ egress_vni_translation_common() ...@@ -1882,20 +1908,20 @@ egress_vni_translation_common()
# Make sure that packets sent from the first VTEP over VLAN 10 are # Make sure that packets sent from the first VTEP over VLAN 10 are
# received by the SVI corresponding to the L3VNI (14000 / VLAN 4000) on # received by the SVI corresponding to the L3VNI (14000 / VLAN 4000) on
# the second VTEP, since it is configured as PVID. # the second VTEP, since it is configured as PVID.
run_cmd "ip netns exec $ns1 $mz br0.10 -A $src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q" run_cmd "ip netns exec $ns1 $mz br0.10 -a own -b $grp_dmac -A $src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q"
tc_check_packets "$ns2" "dev br0.4000 ingress" 101 1 tc_check_packets "$ns2" "dev br0.4000 ingress" 101 1
log_test $? 0 "Egress VNI translation - PVID configured" log_test $? 0 "Egress VNI translation - PVID configured"
# Remove PVID flag from VLAN 4000 on the second VTEP and make sure # Remove PVID flag from VLAN 4000 on the second VTEP and make sure
# packets are no longer received by the SVI interface. # packets are no longer received by the SVI interface.
run_cmd "bridge -n $ns2 vlan add vid 4000 dev vx0" run_cmd "bridge -n $ns2 vlan add vid 4000 dev vx0"
run_cmd "ip netns exec $ns1 $mz br0.10 -A $src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q" run_cmd "ip netns exec $ns1 $mz br0.10 -a own -b $grp_dmac -A $src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q"
tc_check_packets "$ns2" "dev br0.4000 ingress" 101 1 tc_check_packets "$ns2" "dev br0.4000 ingress" 101 1
log_test $? 0 "Egress VNI translation - no PVID configured" log_test $? 0 "Egress VNI translation - no PVID configured"
# Reconfigure the PVID and make sure packets are received again. # Reconfigure the PVID and make sure packets are received again.
run_cmd "bridge -n $ns2 vlan add vid 4000 dev vx0 pvid" run_cmd "bridge -n $ns2 vlan add vid 4000 dev vx0 pvid"
run_cmd "ip netns exec $ns1 $mz br0.10 -A $src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q" run_cmd "ip netns exec $ns1 $mz br0.10 -a own -b $grp_dmac -A $src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q"
tc_check_packets "$ns2" "dev br0.4000 ingress" 101 2 tc_check_packets "$ns2" "dev br0.4000 ingress" 101 2
log_test $? 0 "Egress VNI translation - PVID reconfigured" log_test $? 0 "Egress VNI translation - PVID reconfigured"
} }
...@@ -1908,6 +1934,7 @@ egress_vni_translation_ipv4_ipv4() ...@@ -1908,6 +1934,7 @@ egress_vni_translation_ipv4_ipv4()
local plen=32 local plen=32
local proto="ipv4" local proto="ipv4"
local grp=239.1.1.1 local grp=239.1.1.1
local grp_dmac=01:00:5e:01:01:01
local src=192.0.2.129 local src=192.0.2.129
echo echo
...@@ -1915,7 +1942,7 @@ egress_vni_translation_ipv4_ipv4() ...@@ -1915,7 +1942,7 @@ egress_vni_translation_ipv4_ipv4()
echo "----------------------------------------------------------------" echo "----------------------------------------------------------------"
egress_vni_translation_common $ns1 $ns2 $mcast_grp $plen $proto $grp \ egress_vni_translation_common $ns1 $ns2 $mcast_grp $plen $proto $grp \
$src "mausezahn" $grp_dmac $src "mausezahn"
} }
egress_vni_translation_ipv6_ipv4() egress_vni_translation_ipv6_ipv4()
...@@ -1926,6 +1953,7 @@ egress_vni_translation_ipv6_ipv4() ...@@ -1926,6 +1953,7 @@ egress_vni_translation_ipv6_ipv4()
local plen=32 local plen=32
local proto="ipv6" local proto="ipv6"
local grp=ff0e::1 local grp=ff0e::1
local grp_dmac=33:33:00:00:00:01
local src=2001:db8:100::1 local src=2001:db8:100::1
echo echo
...@@ -1933,7 +1961,7 @@ egress_vni_translation_ipv6_ipv4() ...@@ -1933,7 +1961,7 @@ egress_vni_translation_ipv6_ipv4()
echo "----------------------------------------------------------------" echo "----------------------------------------------------------------"
egress_vni_translation_common $ns1 $ns2 $mcast_grp $plen $proto $grp \ egress_vni_translation_common $ns1 $ns2 $mcast_grp $plen $proto $grp \
$src "mausezahn -6" $grp_dmac $src "mausezahn -6"
} }
egress_vni_translation_ipv4_ipv6() egress_vni_translation_ipv4_ipv6()
...@@ -1944,6 +1972,7 @@ egress_vni_translation_ipv4_ipv6() ...@@ -1944,6 +1972,7 @@ egress_vni_translation_ipv4_ipv6()
local plen=128 local plen=128
local proto="ipv4" local proto="ipv4"
local grp=239.1.1.1 local grp=239.1.1.1
local grp_dmac=01:00:5e:01:01:01
local src=192.0.2.129 local src=192.0.2.129
echo echo
...@@ -1951,7 +1980,7 @@ egress_vni_translation_ipv4_ipv6() ...@@ -1951,7 +1980,7 @@ egress_vni_translation_ipv4_ipv6()
echo "----------------------------------------------------------------" echo "----------------------------------------------------------------"
egress_vni_translation_common $ns1 $ns2 $mcast_grp $plen $proto $grp \ egress_vni_translation_common $ns1 $ns2 $mcast_grp $plen $proto $grp \
$src "mausezahn" $grp_dmac $src "mausezahn"
} }
egress_vni_translation_ipv6_ipv6() egress_vni_translation_ipv6_ipv6()
...@@ -1962,6 +1991,7 @@ egress_vni_translation_ipv6_ipv6() ...@@ -1962,6 +1991,7 @@ egress_vni_translation_ipv6_ipv6()
local plen=128 local plen=128
local proto="ipv6" local proto="ipv6"
local grp=ff0e::1 local grp=ff0e::1
local grp_dmac=33:33:00:00:00:01
local src=2001:db8:100::1 local src=2001:db8:100::1
echo echo
...@@ -1969,7 +1999,7 @@ egress_vni_translation_ipv6_ipv6() ...@@ -1969,7 +1999,7 @@ egress_vni_translation_ipv6_ipv6()
echo "----------------------------------------------------------------" echo "----------------------------------------------------------------"
egress_vni_translation_common $ns1 $ns2 $mcast_grp $plen $proto $grp \ egress_vni_translation_common $ns1 $ns2 $mcast_grp $plen $proto $grp \
$src "mausezahn -6" $grp_dmac $src "mausezahn -6"
} }
all_zeros_mdb_common() all_zeros_mdb_common()
...@@ -1982,12 +2012,18 @@ all_zeros_mdb_common() ...@@ -1982,12 +2012,18 @@ all_zeros_mdb_common()
local vtep4_ip=$1; shift local vtep4_ip=$1; shift
local plen=$1; shift local plen=$1; shift
local ipv4_grp=239.1.1.1 local ipv4_grp=239.1.1.1
local ipv4_grp_dmac=01:00:5e:01:01:01
local ipv4_unreg_grp=239.2.2.2 local ipv4_unreg_grp=239.2.2.2
local ipv4_unreg_grp_dmac=01:00:5e:02:02:02
local ipv4_ll_grp=224.0.0.100 local ipv4_ll_grp=224.0.0.100
local ipv4_ll_grp_dmac=01:00:5e:00:00:64
local ipv4_src=192.0.2.129 local ipv4_src=192.0.2.129
local ipv6_grp=ff0e::1 local ipv6_grp=ff0e::1
local ipv6_grp_dmac=33:33:00:00:00:01
local ipv6_unreg_grp=ff0e::2 local ipv6_unreg_grp=ff0e::2
local ipv6_unreg_grp_dmac=33:33:00:00:00:02
local ipv6_ll_grp=ff02::1 local ipv6_ll_grp=ff02::1
local ipv6_ll_grp_dmac=33:33:00:00:00:01
local ipv6_src=2001:db8:100::1 local ipv6_src=2001:db8:100::1
# Install all-zeros (catchall) MDB entries for IPv4 and IPv6 traffic # Install all-zeros (catchall) MDB entries for IPv4 and IPv6 traffic
...@@ -2023,7 +2059,7 @@ all_zeros_mdb_common() ...@@ -2023,7 +2059,7 @@ all_zeros_mdb_common()
# Send registered IPv4 multicast and make sure it only arrives to the # Send registered IPv4 multicast and make sure it only arrives to the
# first VTEP. # first VTEP.
run_cmd "ip netns exec $ns1 mausezahn br0.10 -A $ipv4_src -B $ipv4_grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q" run_cmd "ip netns exec $ns1 mausezahn br0.10 -a own -b $ipv4_grp_dmac -A $ipv4_src -B $ipv4_grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q"
tc_check_packets "$ns2" "dev vx0 ingress" 101 1 tc_check_packets "$ns2" "dev vx0 ingress" 101 1
log_test $? 0 "Registered IPv4 multicast - first VTEP" log_test $? 0 "Registered IPv4 multicast - first VTEP"
tc_check_packets "$ns2" "dev vx0 ingress" 102 0 tc_check_packets "$ns2" "dev vx0 ingress" 102 0
...@@ -2031,7 +2067,7 @@ all_zeros_mdb_common() ...@@ -2031,7 +2067,7 @@ all_zeros_mdb_common()
# Send unregistered IPv4 multicast that is not link-local and make sure # Send unregistered IPv4 multicast that is not link-local and make sure
# it arrives to the first and second VTEPs. # it arrives to the first and second VTEPs.
run_cmd "ip netns exec $ns1 mausezahn br0.10 -A $ipv4_src -B $ipv4_unreg_grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q" run_cmd "ip netns exec $ns1 mausezahn br0.10 -a own -b $ipv4_unreg_grp_dmac -A $ipv4_src -B $ipv4_unreg_grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q"
tc_check_packets "$ns2" "dev vx0 ingress" 101 2 tc_check_packets "$ns2" "dev vx0 ingress" 101 2
log_test $? 0 "Unregistered IPv4 multicast - first VTEP" log_test $? 0 "Unregistered IPv4 multicast - first VTEP"
tc_check_packets "$ns2" "dev vx0 ingress" 102 1 tc_check_packets "$ns2" "dev vx0 ingress" 102 1
...@@ -2039,7 +2075,7 @@ all_zeros_mdb_common() ...@@ -2039,7 +2075,7 @@ all_zeros_mdb_common()
# Send IPv4 link-local multicast traffic and make sure it does not # Send IPv4 link-local multicast traffic and make sure it does not
# arrive to any VTEP. # arrive to any VTEP.
run_cmd "ip netns exec $ns1 mausezahn br0.10 -A $ipv4_src -B $ipv4_ll_grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q" run_cmd "ip netns exec $ns1 mausezahn br0.10 -a own -b $ipv4_ll_grp_dmac -A $ipv4_src -B $ipv4_ll_grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q"
tc_check_packets "$ns2" "dev vx0 ingress" 101 2 tc_check_packets "$ns2" "dev vx0 ingress" 101 2
log_test $? 0 "Link-local IPv4 multicast - first VTEP" log_test $? 0 "Link-local IPv4 multicast - first VTEP"
tc_check_packets "$ns2" "dev vx0 ingress" 102 1 tc_check_packets "$ns2" "dev vx0 ingress" 102 1
...@@ -2074,7 +2110,7 @@ all_zeros_mdb_common() ...@@ -2074,7 +2110,7 @@ all_zeros_mdb_common()
# Send registered IPv6 multicast and make sure it only arrives to the # Send registered IPv6 multicast and make sure it only arrives to the
# third VTEP. # third VTEP.
run_cmd "ip netns exec $ns1 mausezahn -6 br0.10 -A $ipv6_src -B $ipv6_grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q" run_cmd "ip netns exec $ns1 mausezahn -6 br0.10 -a own -b $ipv6_grp_dmac -A $ipv6_src -B $ipv6_grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q"
tc_check_packets "$ns2" "dev vx0 ingress" 103 1 tc_check_packets "$ns2" "dev vx0 ingress" 103 1
log_test $? 0 "Registered IPv6 multicast - third VTEP" log_test $? 0 "Registered IPv6 multicast - third VTEP"
tc_check_packets "$ns2" "dev vx0 ingress" 104 0 tc_check_packets "$ns2" "dev vx0 ingress" 104 0
...@@ -2082,7 +2118,7 @@ all_zeros_mdb_common() ...@@ -2082,7 +2118,7 @@ all_zeros_mdb_common()
# Send unregistered IPv6 multicast that is not link-local and make sure # Send unregistered IPv6 multicast that is not link-local and make sure
# it arrives to the third and fourth VTEPs. # it arrives to the third and fourth VTEPs.
run_cmd "ip netns exec $ns1 mausezahn -6 br0.10 -A $ipv6_src -B $ipv6_unreg_grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q" run_cmd "ip netns exec $ns1 mausezahn -6 br0.10 -a own -b $ipv6_unreg_grp_dmac -A $ipv6_src -B $ipv6_unreg_grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q"
tc_check_packets "$ns2" "dev vx0 ingress" 103 2 tc_check_packets "$ns2" "dev vx0 ingress" 103 2
log_test $? 0 "Unregistered IPv6 multicast - third VTEP" log_test $? 0 "Unregistered IPv6 multicast - third VTEP"
tc_check_packets "$ns2" "dev vx0 ingress" 104 1 tc_check_packets "$ns2" "dev vx0 ingress" 104 1
...@@ -2090,7 +2126,7 @@ all_zeros_mdb_common() ...@@ -2090,7 +2126,7 @@ all_zeros_mdb_common()
# Send IPv6 link-local multicast traffic and make sure it does not # Send IPv6 link-local multicast traffic and make sure it does not
# arrive to any VTEP. # arrive to any VTEP.
run_cmd "ip netns exec $ns1 mausezahn -6 br0.10 -A $ipv6_src -B $ipv6_ll_grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q" run_cmd "ip netns exec $ns1 mausezahn -6 br0.10 -a own -b $ipv6_ll_grp_dmac -A $ipv6_src -B $ipv6_ll_grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q"
tc_check_packets "$ns2" "dev vx0 ingress" 103 2 tc_check_packets "$ns2" "dev vx0 ingress" 103 2
log_test $? 0 "Link-local IPv6 multicast - third VTEP" log_test $? 0 "Link-local IPv6 multicast - third VTEP"
tc_check_packets "$ns2" "dev vx0 ingress" 104 1 tc_check_packets "$ns2" "dev vx0 ingress" 104 1
...@@ -2165,6 +2201,7 @@ mdb_fdb_common() ...@@ -2165,6 +2201,7 @@ mdb_fdb_common()
local plen=$1; shift local plen=$1; shift
local proto=$1; shift local proto=$1; shift
local grp=$1; shift local grp=$1; shift
local grp_dmac=$1; shift
local src=$1; shift local src=$1; shift
local mz=$1; shift local mz=$1; shift
...@@ -2188,7 +2225,7 @@ mdb_fdb_common() ...@@ -2188,7 +2225,7 @@ mdb_fdb_common()
# Send IP multicast traffic and make sure it is forwarded by the MDB # Send IP multicast traffic and make sure it is forwarded by the MDB
# and only arrives to the first VTEP. # and only arrives to the first VTEP.
run_cmd "ip netns exec $ns1 $mz br0.10 -A $src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q" run_cmd "ip netns exec $ns1 $mz br0.10 -a own -b $grp_dmac -A $src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q"
tc_check_packets "$ns2" "dev vx0 ingress" 101 1 tc_check_packets "$ns2" "dev vx0 ingress" 101 1
log_test $? 0 "IP multicast - first VTEP" log_test $? 0 "IP multicast - first VTEP"
tc_check_packets "$ns2" "dev vx0 ingress" 102 0 tc_check_packets "$ns2" "dev vx0 ingress" 102 0
...@@ -2205,7 +2242,7 @@ mdb_fdb_common() ...@@ -2205,7 +2242,7 @@ mdb_fdb_common()
# Remove the MDB entry and make sure that IP multicast is now forwarded # Remove the MDB entry and make sure that IP multicast is now forwarded
# by the FDB to the second VTEP. # by the FDB to the second VTEP.
run_cmd "bridge -n $ns1 mdb del dev vx0 port vx0 grp $grp dst $vtep1_ip src_vni 10010" run_cmd "bridge -n $ns1 mdb del dev vx0 port vx0 grp $grp dst $vtep1_ip src_vni 10010"
run_cmd "ip netns exec $ns1 $mz br0.10 -A $src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q" run_cmd "ip netns exec $ns1 $mz br0.10 -a own -b $grp_dmac -A $src -B $grp -t udp sp=12345,dp=54321 -p 100 -c 1 -q"
tc_check_packets "$ns2" "dev vx0 ingress" 101 1 tc_check_packets "$ns2" "dev vx0 ingress" 101 1
log_test $? 0 "IP multicast after removal - first VTEP" log_test $? 0 "IP multicast after removal - first VTEP"
tc_check_packets "$ns2" "dev vx0 ingress" 102 2 tc_check_packets "$ns2" "dev vx0 ingress" 102 2
...@@ -2221,14 +2258,15 @@ mdb_fdb_ipv4_ipv4() ...@@ -2221,14 +2258,15 @@ mdb_fdb_ipv4_ipv4()
local plen=32 local plen=32
local proto="ipv4" local proto="ipv4"
local grp=239.1.1.1 local grp=239.1.1.1
local grp_dmac=01:00:5e:01:01:01
local src=192.0.2.129 local src=192.0.2.129
echo echo
echo "Data path: MDB with FDB - IPv4 overlay / IPv4 underlay" echo "Data path: MDB with FDB - IPv4 overlay / IPv4 underlay"
echo "------------------------------------------------------" echo "------------------------------------------------------"
mdb_fdb_common $ns1 $ns2 $vtep1_ip $vtep2_ip $plen $proto $grp $src \ mdb_fdb_common $ns1 $ns2 $vtep1_ip $vtep2_ip $plen $proto $grp \
"mausezahn" $grp_dmac $src "mausezahn"
} }
mdb_fdb_ipv6_ipv4() mdb_fdb_ipv6_ipv4()
...@@ -2240,14 +2278,15 @@ mdb_fdb_ipv6_ipv4() ...@@ -2240,14 +2278,15 @@ mdb_fdb_ipv6_ipv4()
local plen=32 local plen=32
local proto="ipv6" local proto="ipv6"
local grp=ff0e::1 local grp=ff0e::1
local grp_dmac=33:33:00:00:00:01
local src=2001:db8:100::1 local src=2001:db8:100::1
echo echo
echo "Data path: MDB with FDB - IPv6 overlay / IPv4 underlay" echo "Data path: MDB with FDB - IPv6 overlay / IPv4 underlay"
echo "------------------------------------------------------" echo "------------------------------------------------------"
mdb_fdb_common $ns1 $ns2 $vtep1_ip $vtep2_ip $plen $proto $grp $src \ mdb_fdb_common $ns1 $ns2 $vtep1_ip $vtep2_ip $plen $proto $grp \
"mausezahn -6" $grp_dmac $src "mausezahn -6"
} }
mdb_fdb_ipv4_ipv6() mdb_fdb_ipv4_ipv6()
...@@ -2259,14 +2298,15 @@ mdb_fdb_ipv4_ipv6() ...@@ -2259,14 +2298,15 @@ mdb_fdb_ipv4_ipv6()
local plen=128 local plen=128
local proto="ipv4" local proto="ipv4"
local grp=239.1.1.1 local grp=239.1.1.1
local grp_dmac=01:00:5e:01:01:01
local src=192.0.2.129 local src=192.0.2.129
echo echo
echo "Data path: MDB with FDB - IPv4 overlay / IPv6 underlay" echo "Data path: MDB with FDB - IPv4 overlay / IPv6 underlay"
echo "------------------------------------------------------" echo "------------------------------------------------------"
mdb_fdb_common $ns1 $ns2 $vtep1_ip $vtep2_ip $plen $proto $grp $src \ mdb_fdb_common $ns1 $ns2 $vtep1_ip $vtep2_ip $plen $proto $grp \
"mausezahn" $grp_dmac $src "mausezahn"
} }
mdb_fdb_ipv6_ipv6() mdb_fdb_ipv6_ipv6()
...@@ -2278,14 +2318,15 @@ mdb_fdb_ipv6_ipv6() ...@@ -2278,14 +2318,15 @@ mdb_fdb_ipv6_ipv6()
local plen=128 local plen=128
local proto="ipv6" local proto="ipv6"
local grp=ff0e::1 local grp=ff0e::1
local grp_dmac=33:33:00:00:00:01
local src=2001:db8:100::1 local src=2001:db8:100::1
echo echo
echo "Data path: MDB with FDB - IPv6 overlay / IPv6 underlay" echo "Data path: MDB with FDB - IPv6 overlay / IPv6 underlay"
echo "------------------------------------------------------" echo "------------------------------------------------------"
mdb_fdb_common $ns1 $ns2 $vtep1_ip $vtep2_ip $plen $proto $grp $src \ mdb_fdb_common $ns1 $ns2 $vtep1_ip $vtep2_ip $plen $proto $grp \
"mausezahn -6" $grp_dmac $src "mausezahn -6"
} }
mdb_grp1_loop() mdb_grp1_loop()
...@@ -2320,7 +2361,9 @@ mdb_torture_common() ...@@ -2320,7 +2361,9 @@ mdb_torture_common()
local vtep1_ip=$1; shift local vtep1_ip=$1; shift
local vtep2_ip=$1; shift local vtep2_ip=$1; shift
local grp1=$1; shift local grp1=$1; shift
local grp1_dmac=$1; shift
local grp2=$1; shift local grp2=$1; shift
local grp2_dmac=$1; shift
local src=$1; shift local src=$1; shift
local mz=$1; shift local mz=$1; shift
local pid1 local pid1
...@@ -2345,9 +2388,9 @@ mdb_torture_common() ...@@ -2345,9 +2388,9 @@ mdb_torture_common()
pid1=$! pid1=$!
mdb_grp2_loop $ns1 $vtep1_ip $vtep2_ip $grp2 & mdb_grp2_loop $ns1 $vtep1_ip $vtep2_ip $grp2 &
pid2=$! pid2=$!
ip netns exec $ns1 $mz br0.10 -A $src -B $grp1 -t udp sp=12345,dp=54321 -p 100 -c 0 -q & ip netns exec $ns1 $mz br0.10 -a own -b $grp1_dmac -A $src -B $grp1 -t udp sp=12345,dp=54321 -p 100 -c 0 -q &
pid3=$! pid3=$!
ip netns exec $ns1 $mz br0.10 -A $src -B $grp2 -t udp sp=12345,dp=54321 -p 100 -c 0 -q & ip netns exec $ns1 $mz br0.10 -a own -b $grp2_dmac -A $src -B $grp2 -t udp sp=12345,dp=54321 -p 100 -c 0 -q &
pid4=$! pid4=$!
sleep 30 sleep 30
...@@ -2363,15 +2406,17 @@ mdb_torture_ipv4_ipv4() ...@@ -2363,15 +2406,17 @@ mdb_torture_ipv4_ipv4()
local vtep1_ip=198.51.100.100 local vtep1_ip=198.51.100.100
local vtep2_ip=198.51.100.200 local vtep2_ip=198.51.100.200
local grp1=239.1.1.1 local grp1=239.1.1.1
local grp1_dmac=01:00:5e:01:01:01
local grp2=239.2.2.2 local grp2=239.2.2.2
local grp2_dmac=01:00:5e:02:02:02
local src=192.0.2.129 local src=192.0.2.129
echo echo
echo "Data path: MDB torture test - IPv4 overlay / IPv4 underlay" echo "Data path: MDB torture test - IPv4 overlay / IPv4 underlay"
echo "----------------------------------------------------------" echo "----------------------------------------------------------"
mdb_torture_common $ns1 $vtep1_ip $vtep2_ip $grp1 $grp2 $src \ mdb_torture_common $ns1 $vtep1_ip $vtep2_ip $grp1 $grp1_dmac $grp2 \
"mausezahn" $grp2_dmac $src "mausezahn"
} }
mdb_torture_ipv6_ipv4() mdb_torture_ipv6_ipv4()
...@@ -2380,15 +2425,17 @@ mdb_torture_ipv6_ipv4() ...@@ -2380,15 +2425,17 @@ mdb_torture_ipv6_ipv4()
local vtep1_ip=198.51.100.100 local vtep1_ip=198.51.100.100
local vtep2_ip=198.51.100.200 local vtep2_ip=198.51.100.200
local grp1=ff0e::1 local grp1=ff0e::1
local grp1_dmac=33:33:00:00:00:01
local grp2=ff0e::2 local grp2=ff0e::2
local grp2_dmac=33:33:00:00:00:02
local src=2001:db8:100::1 local src=2001:db8:100::1
echo echo
echo "Data path: MDB torture test - IPv6 overlay / IPv4 underlay" echo "Data path: MDB torture test - IPv6 overlay / IPv4 underlay"
echo "----------------------------------------------------------" echo "----------------------------------------------------------"
mdb_torture_common $ns1 $vtep1_ip $vtep2_ip $grp1 $grp2 $src \ mdb_torture_common $ns1 $vtep1_ip $vtep2_ip $grp1 $grp1_dmac $grp2 \
"mausezahn -6" $grp2_dmac $src "mausezahn -6"
} }
mdb_torture_ipv4_ipv6() mdb_torture_ipv4_ipv6()
...@@ -2397,15 +2444,17 @@ mdb_torture_ipv4_ipv6() ...@@ -2397,15 +2444,17 @@ mdb_torture_ipv4_ipv6()
local vtep1_ip=2001:db8:1000::1 local vtep1_ip=2001:db8:1000::1
local vtep2_ip=2001:db8:2000::1 local vtep2_ip=2001:db8:2000::1
local grp1=239.1.1.1 local grp1=239.1.1.1
local grp1_dmac=01:00:5e:01:01:01
local grp2=239.2.2.2 local grp2=239.2.2.2
local grp2_dmac=01:00:5e:02:02:02
local src=192.0.2.129 local src=192.0.2.129
echo echo
echo "Data path: MDB torture test - IPv4 overlay / IPv6 underlay" echo "Data path: MDB torture test - IPv4 overlay / IPv6 underlay"
echo "----------------------------------------------------------" echo "----------------------------------------------------------"
mdb_torture_common $ns1 $vtep1_ip $vtep2_ip $grp1 $grp2 $src \ mdb_torture_common $ns1 $vtep1_ip $vtep2_ip $grp1 $grp1_dmac $grp2 \
"mausezahn" $grp2_dmac $src "mausezahn"
} }
mdb_torture_ipv6_ipv6() mdb_torture_ipv6_ipv6()
...@@ -2414,15 +2463,17 @@ mdb_torture_ipv6_ipv6() ...@@ -2414,15 +2463,17 @@ mdb_torture_ipv6_ipv6()
local vtep1_ip=2001:db8:1000::1 local vtep1_ip=2001:db8:1000::1
local vtep2_ip=2001:db8:2000::1 local vtep2_ip=2001:db8:2000::1
local grp1=ff0e::1 local grp1=ff0e::1
local grp1_dmac=33:33:00:00:00:01
local grp2=ff0e::2 local grp2=ff0e::2
local grp2_dmac=33:33:00:00:00:02
local src=2001:db8:100::1 local src=2001:db8:100::1
echo echo
echo "Data path: MDB torture test - IPv6 overlay / IPv6 underlay" echo "Data path: MDB torture test - IPv6 overlay / IPv6 underlay"
echo "----------------------------------------------------------" echo "----------------------------------------------------------"
mdb_torture_common $ns1 $vtep1_ip $vtep2_ip $grp1 $grp2 $src \ mdb_torture_common $ns1 $vtep1_ip $vtep2_ip $grp1 $grp1_dmac $grp2 \
"mausezahn -6" $grp2_dmac $src "mausezahn -6"
} }
################################################################################ ################################################################################
......
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