Patch "selftests: forwarding: bridge_mdb_max: Fix failing test with old libnet" has been added to the 6.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    selftests: forwarding: bridge_mdb_max: Fix failing test with old libnet

to the 6.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     selftests-forwarding-bridge_mdb_max-fix-failing-test-with-old-libnet.patch
and it can be found in the queue-6.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From cb034948ac292da82cc0e6bc1340f81be36e117d Mon Sep 17 00:00:00 2001
From: Ido Schimmel <idosch@xxxxxxxxxx>
Date: Tue, 8 Aug 2023 17:15:02 +0300
Subject: selftests: forwarding: bridge_mdb_max: Fix failing test with old libnet

From: Ido Schimmel <idosch@xxxxxxxxxx>

commit cb034948ac292da82cc0e6bc1340f81be36e117d upstream.

As explained in commit 8bcfb4ae4d97 ("selftests: forwarding: Fix failing
tests with old libnet"), old versions of libnet (used by mausezahn) do
not use the "SO_BINDTODEVICE" socket option. For IP unicast packets,
this can be solved by prefixing mausezahn invocations with "ip vrf
exec". However, IP multicast packets do not perform routing and simply
egress the bound device, which does not exist in this case.

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

Fixes: 3446dcd7df05 ("selftests: forwarding: bridge_mdb_max: Add a new selftest")
Reported-by: Mirsad Todorovac <mirsad.todorovac@xxxxxxxxxxxx>
Closes: https://lore.kernel.org/netdev/adc5e40d-d040-a65e-eb26-edf47dac5b02@xxxxxxxxxxxx/
Signed-off-by: Ido Schimmel <idosch@xxxxxxxxxx>
Tested-by: Mirsad Todorovac <mirsad.todorovac@xxxxxxxxxxxx>
Reviewed-by: Hangbin Liu <liuhangbin@xxxxxxxxx>
Acked-by: Nikolay Aleksandrov <razor@xxxxxxxxxxxxx>
Link: https://lore.kernel.org/r/20230808141503.4060661-17-idosch@xxxxxxxxxx
Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 .../selftests/net/forwarding/bridge_mdb_max.sh     | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/tools/testing/selftests/net/forwarding/bridge_mdb_max.sh b/tools/testing/selftests/net/forwarding/bridge_mdb_max.sh
index fa762b716288..3da9d93ab36f 100755
--- a/tools/testing/selftests/net/forwarding/bridge_mdb_max.sh
+++ b/tools/testing/selftests/net/forwarding/bridge_mdb_max.sh
@@ -252,7 +252,8 @@ ctl4_entries_add()
 	local IPs=$(seq -f 192.0.2.%g 1 $((n - 1)))
 	local peer=$(locus_dev_peer $locus)
 	local GRP=239.1.1.${grp}
-	$MZ $peer -c 1 -A 192.0.2.1 -B $GRP \
+	local dmac=01:00:5e:01:01:$(printf "%02x" $grp)
+	$MZ $peer -a own -b $dmac -c 1 -A 192.0.2.1 -B $GRP \
 		-t ip proto=2,p=$(igmpv3_is_in_get $GRP $IPs) -q
 	sleep 1
 
@@ -272,7 +273,8 @@ ctl4_entries_del()
 
 	local peer=$(locus_dev_peer $locus)
 	local GRP=239.1.1.${grp}
-	$MZ $peer -c 1 -A 192.0.2.1 -B 224.0.0.2 \
+	local dmac=01:00:5e:00:00:02
+	$MZ $peer -a own -b $dmac -c 1 -A 192.0.2.1 -B 224.0.0.2 \
 		-t ip proto=2,p=$(igmpv2_leave_get $GRP) -q
 	sleep 1
 	! bridge mdb show dev br0 | grep -q $GRP
@@ -289,8 +291,10 @@ ctl6_entries_add()
 	local peer=$(locus_dev_peer $locus)
 	local SIP=fe80::1
 	local GRP=ff0e::${grp}
+	local dmac=33:33:00:00:00:$(printf "%02x" $grp)
 	local p=$(mldv2_is_in_get $SIP $GRP $IPs)
-	$MZ -6 $peer -c 1 -A $SIP -B $GRP -t ip hop=1,next=0,p="$p" -q
+	$MZ -6 $peer -a own -b $dmac -c 1 -A $SIP -B $GRP \
+		-t ip hop=1,next=0,p="$p" -q
 	sleep 1
 
 	local nn=$(bridge mdb show dev br0 | grep $GRP | wc -l)
@@ -310,8 +314,10 @@ ctl6_entries_del()
 	local peer=$(locus_dev_peer $locus)
 	local SIP=fe80::1
 	local GRP=ff0e::${grp}
+	local dmac=33:33:00:00:00:$(printf "%02x" $grp)
 	local p=$(mldv1_done_get $SIP $GRP)
-	$MZ -6 $peer -c 1 -A $SIP -B $GRP -t ip hop=1,next=0,p="$p" -q
+	$MZ -6 $peer -a own -b $dmac -c 1 -A $SIP -B $GRP \
+		-t ip hop=1,next=0,p="$p" -q
 	sleep 1
 	! bridge mdb show dev br0 | grep -q $GRP
 }
-- 
2.41.0



Patches currently in stable-queue which might be from idosch@xxxxxxxxxx are

queue-6.4/selftests-forwarding-ethtool-skip-when-using-veth-pairs.patch
queue-6.4/selftests-forwarding-bridge_mdb_max-fix-failing-test-with-old-libnet.patch
queue-6.4/selftests-forwarding-skip-test-when-no-interfaces-are-specified.patch
queue-6.4/selftests-forwarding-bridge_mdb-fix-failing-test-with-old-libnet.patch
queue-6.4/selftests-forwarding-tc_tunnel_key-make-filters-more-specific.patch
queue-6.4/selftests-forwarding-tc_flower-relax-success-criterion.patch
queue-6.4/selftests-forwarding-bridge_mdb-check-iproute2-version.patch
queue-6.4/selftests-forwarding-bridge_mdb-make-test-more-robust.patch
queue-6.4/selftests-forwarding-ethtool_extended_state-skip-when-using-veth-pairs.patch
queue-6.4/selftests-forwarding-ethtool_mm-skip-when-mac-merge-is-not-supported.patch
queue-6.4/selftests-forwarding-add-a-helper-to-skip-test-when-using-veth-pairs.patch
queue-6.4/selftests-forwarding-switch-off-timeout.patch
queue-6.4/selftests-forwarding-hw_stats_l3_gre-skip-when-using-veth-pairs.patch
queue-6.4/selftests-forwarding-bridge_mdb_max-check-iproute2-version.patch
queue-6.4/selftests-forwarding-tc_actions-use-ncat-instead-of-nc.patch
queue-6.4/selftests-forwarding-set-default-ipv6-traceroute-utility.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux