[Devel] [PATCH RHEL10 COMMIT] selftests: forwarding: vxlan_bridge_1d: fix test failure with br_netfilter enabled

Konstantin Khorenko khorenko at virtuozzo.com
Wed Feb 4 18:07:35 MSK 2026


The commit is pushed to "branch-rh10-6.12.0-55.52.1.5.x.vz10-ovz" and will appear at git at bitbucket.org:openvz/vzkernel.git
after rh10-6.12.0-55.52.1.5.5.vz10
------>
commit c699d89284988101ec52f4325b2471e875b2d8c7
Author: Aleksei Oladko <aleksey.oladko at virtuozzo.com>
Date:   Sat Jan 31 23:19:36 2026 +0000

    selftests: forwarding: vxlan_bridge_1d: fix test failure with br_netfilter enabled
    
    The test generates VXLAN traffic using mausezahn, where the encapsulated
    inner IPv4 packet contains a zero IP header checksum. After VXLAN
    decapsulation, such packets do not pass sanity checks in br_netfilter
    and are dropped, which causes the test to fail.
    
    Fix this by calculating and setting a valid IPv4 header checksum for the
    encapsulated packet generated by mausezahn, so that the packet is accepted
    by br_netfilter.
    
    https://virtuozzo.atlassian.net/browse/VSTOR-123249
    
    Signed-off-by: Aleksei Oladko <aleksey.oladko at virtuozzo.com>
    
    Feature: fix selftests
---
 .../selftests/net/forwarding/vxlan_bridge_1d.sh    | 26 +++++++++++++---------
 1 file changed, 16 insertions(+), 10 deletions(-)

diff --git a/tools/testing/selftests/net/forwarding/vxlan_bridge_1d.sh b/tools/testing/selftests/net/forwarding/vxlan_bridge_1d.sh
index 3f9d50f1ef9ec..1952023c43ba4 100755
--- a/tools/testing/selftests/net/forwarding/vxlan_bridge_1d.sh
+++ b/tools/testing/selftests/net/forwarding/vxlan_bridge_1d.sh
@@ -559,6 +559,21 @@ vxlan_encapped_ping_do()
 	local inner_tos=$1; shift
 	local outer_tos=$1; shift
 
+	local ipv4hdr=$(:
+		    )"45:"$(                      : IP version + IHL
+		    )"$inner_tos:"$(              : IP TOS
+		    )"00:54:"$(                   : IP total length
+		    )"99:83:"$(                   : IP identification
+		    )"40:00:"$(                   : IP flags + frag off
+		    )"40:"$(                      : IP TTL
+		    )"01:"$(                      : IP proto
+		    )"CHECKSUM:"$(                : IP header csum
+		    )"c0:00:02:03:"$(             : IP saddr: 192.0.2.3
+		    )"c0:00:02:01"$(              : IP daddr: 192.0.2.1
+		)
+	local checksum=$(payload_template_calc_checksum "$ipv4hdr")
+	ipv4hdr=$(payload_template_expand_checksum "$ipv4hdr" $checksum)
+
 	$MZ $dev -c $count -d 100msec -q \
 		-b $next_hop_mac -B $dest_ip \
 		-t udp tos=$outer_tos,sp=23456,dp=$VXPORT,p=$(:
@@ -569,16 +584,7 @@ vxlan_encapped_ping_do()
 		    )"$dest_mac:"$(               : ETH daddr
 		    )"$(mac_get w2):"$(           : ETH saddr
 		    )"08:00:"$(                   : ETH type
-		    )"45:"$(                      : IP version + IHL
-		    )"$inner_tos:"$(              : IP TOS
-		    )"00:54:"$(                   : IP total length
-		    )"99:83:"$(                   : IP identification
-		    )"40:00:"$(                   : IP flags + frag off
-		    )"40:"$(                      : IP TTL
-		    )"01:"$(                      : IP proto
-		    )"00:00:"$(                   : IP header csum
-		    )"c0:00:02:03:"$(             : IP saddr: 192.0.2.3
-		    )"c0:00:02:01:"$(             : IP daddr: 192.0.2.1
+		    )"$ipv4hdr:"$(                : IPv4 header
 		    )"08:"$(                      : ICMP type
 		    )"00:"$(                      : ICMP code
 		    )"8b:f2:"$(                   : ICMP csum


More information about the Devel mailing list