* [Devel] [PATCH hci-8.1 v3 0/5] selftests: net: make the net tests pass on a vz10 host
@ 2026-09-22 15:00 Konstantin Khorenko
2026-09-22 15:00 ` [Devel] [PATCH hci-8.1 v3 1/5] selftests: net: run the fdb and bind tests in their own netns Konstantin Khorenko
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: Konstantin Khorenko @ 2026-09-22 15:00 UTC (permalink / raw)
To: Eva Kurchatova; +Cc: devel
This is Eva's series as reviewed on the list, with the two changes below
made while applying, so that the version on the list is the one in the
tree.
The net selftests fail on a vz10 host for reasons unrelated to the code
under test: the vxlan Open vSwitch keeps on port 4789, sockets other
services hold on 0.0.0.0, features this kernel does not have (erspan is
disabled under CONFIG_VE, the SM4 and ARIA ciphers are not built), an
iproute2 that fails a netconf dump that worked, and an installed
testsuite without the script its wrapper runs. Patches 1-4 fix the
tests for each of these.
Patch 5 is an upstream fix. The bridged PMTU tests fail because the tree
has 8930424777e4 ("tunnels: Accept PACKET_HOST in
skb_tunnel_check_pmtu()") from the RHEL import, which makes a bridged
vxlan answer an oversized locally generated packet with an ICMP, but not
b58d74963320 ("tunnels: Drop stale dst when building an ICMP error for
PMTUD"), which fixes the bug that came with it: the ICMP keeps the
original packet's dst and is dropped or sent out of the tunnel instead
of being delivered. The cherry-pick brings the kernel fix together with
the pmtu.sh change v2 carried as a separate patch.
Changes since v2:
- "selftests: net: make the veth GRO checks independent of host tunnels"
is dropped. udpgso_bench_rx -G enables udp_encap_needed_key itself,
so the aggregation checks stop testing rx-udp-gro-forwarding on every
host. A v3 of that patch with a SKIP instead is requested in the reply
to v2 3/6.
- "selftests: net: let the bridged PMTU tests take the ICMP they ask
for" is replaced with the cherry-pick of b58d74963320, whose selftest
hunk it was.
- Reviewed-by from Vladimir, given on v1, added to the four test
patches.
v1: https://lore.virtuozzo.com/20260831224850.1642265-1-eva.kurchatova@virtuozzo.com
v2: https://lore.virtuozzo.com/20260922120235.2729869-1-eva.kurchatova@virtuozzo.com
Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
---
Eva Kurchatova (4):
selftests: net: run the fdb and bind tests in their own netns
selftests: net: skip what this kernel and iproute2 do not have
selftests: net: install pmtu.sh, the script pmtu_wrapper.sh runs
selftests: net: mark test_ingress_egress_chaining.sh executable
Ido Schimmel (1):
ms/tunnels: Drop stale dst when building an ICMP error for PMTUD
net/ipv4/ip_tunnel_core.c | 6 +++++
tools/testing/selftests/net/Makefile | 1 +
tools/testing/selftests/net/bind_wildcard.c | 13 +++++++++
tools/testing/selftests/net/fdb_notify.sh | 7 +++++
tools/testing/selftests/net/ip_local_port_range.c | 17 +++++++++---
tools/testing/selftests/net/pmtu.sh | 2 +-
tools/testing/selftests/net/rtnetlink.py | 11 ++++++--
tools/testing/selftests/net/rtnetlink.sh | 31 ++++++++++++++++++++++
.../selftests/net/test_ingress_egress_chaining.sh | 0
.../selftests/net/test_vxlan_fdb_changelink.sh | 7 +++++
tools/testing/selftests/net/tls.c | 2 ++
11 files changed, 90 insertions(+), 7 deletions(-)
---
base-commit: 7ecb7901c3065a4c30b55adebc059c3dd4d06424
change-id: 20260922-b4-kh-self1-3fc9d437263a
Best regards,
--
Konstantin Khorenko <khorenko@virtuozzo.com>
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Devel] [PATCH hci-8.1 v3 1/5] selftests: net: run the fdb and bind tests in their own netns
2026-09-22 15:00 [Devel] [PATCH hci-8.1 v3 0/5] selftests: net: make the net tests pass on a vz10 host Konstantin Khorenko
@ 2026-09-22 15:00 ` Konstantin Khorenko
2026-09-22 15:00 ` [Devel] [PATCH hci-8.1 v3 2/5] selftests: net: skip what this kernel and iproute2 do not have Konstantin Khorenko
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Konstantin Khorenko @ 2026-09-22 15:00 UTC (permalink / raw)
To: Eva Kurchatova; +Cc: devel
From: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
Three tests share the initial namespace with the machine and fail on
what is already in it.
fdb_notify and test_vxlan_fdb_changelink bring up a vxlan device on the
default port 4789. Where the machine already has one there, and that
one is metadata based, as the device open vswitch keeps is, the port
cannot be shared and the test device is never created:
# ip link add vxs type vxlan external dstport 4789
# ip link add name vx up type vxlan id 2000 dstport 4789
RTNETLINK answers: Address already in use
# ./test_vxlan_fdb_changelink.sh
Cannot find device "vx"
expected two remotes after link set [FAIL]
Run both in a fresh namespace by re-executing them there, the way
nft_audit.sh, nft_concat_range.sh and br_netfilter_queue.sh already do.
bind_wildcard binds 0.0.0.0 and expects to know which sockets exist.
With 432 foreign sockets on 0.0.0.0 on the machine it failed 6 runs out
of 10; unsharing a namespace in FIXTURE_SETUP took that to 0 out of 10.
This is what commit a897e194c475 ("selftests: net: run reuseport in an
isolated netns") does for the reuseport tests.
https: //virtuozzo.atlassian.net/browse/VSTOR-139651
Feature: fix selftests
Signed-off-by: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
Reviewed-by: Vladimir Riabchun <vladimir.riabchun@virtuozzo.com>
---
tools/testing/selftests/net/bind_wildcard.c | 13 +++++++++++++
tools/testing/selftests/net/fdb_notify.sh | 7 +++++++
tools/testing/selftests/net/test_vxlan_fdb_changelink.sh | 7 +++++++
3 files changed, 27 insertions(+)
diff --git a/tools/testing/selftests/net/bind_wildcard.c b/tools/testing/selftests/net/bind_wildcard.c
index b7b54d646b937..5ebf21c97df1a 100644
--- a/tools/testing/selftests/net/bind_wildcard.c
+++ b/tools/testing/selftests/net/bind_wildcard.c
@@ -1,6 +1,10 @@
// SPDX-License-Identifier: GPL-2.0
/* Copyright Amazon.com Inc. or its affiliates. */
+#define _GNU_SOURCE
+#include <sched.h>
+
+#include <stdlib.h>
#include <sys/socket.h>
#include <netinet/in.h>
@@ -716,6 +720,15 @@ static void setup_addr(FIXTURE_DATA(bind_wildcard) *self, int i,
FIXTURE_SETUP(bind_wildcard)
{
+ /* The port is picked by the kernel and the test then expects every
+ * conflict on it to be one it caused itself. A socket the rest of
+ * the system holds on that port breaks that: a v6only bind to ::
+ * is given a port whose 0.0.0.0 counterpart is taken, and the
+ * binds that follow fail with EADDRINUSE the test does not expect.
+ */
+ ASSERT_EQ(unshare(CLONE_NEWNET), 0);
+ ASSERT_EQ(system("ip link set lo up"), 0);
+
setup_addr(self, 0, variant->family[0], variant->addr[0]);
setup_addr(self, 1, variant->family[1], variant->addr[1]);
diff --git a/tools/testing/selftests/net/fdb_notify.sh b/tools/testing/selftests/net/fdb_notify.sh
index c159230c9b623..4f65f6720b1b8 100755
--- a/tools/testing/selftests/net/fdb_notify.sh
+++ b/tools/testing/selftests/net/fdb_notify.sh
@@ -1,6 +1,13 @@
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0
+# The test brings up a vxlan device on the default port, which fails where
+# the host already has one, as a metadata-based device holding that port is
+# not compatible with the one the test asks for:
+# RTNETLINK answers: Address already in use
+# Run in a fresh network namespace, like the netfilter tests do.
+[ "${1}" != "run" ] && { unshare -n "${0}" run; exit $?; }
+
source lib.sh
ALL_TESTS="
diff --git a/tools/testing/selftests/net/test_vxlan_fdb_changelink.sh b/tools/testing/selftests/net/test_vxlan_fdb_changelink.sh
index 2d442cdab11e1..7319bbcc4fbc2 100755
--- a/tools/testing/selftests/net/test_vxlan_fdb_changelink.sh
+++ b/tools/testing/selftests/net/test_vxlan_fdb_changelink.sh
@@ -3,6 +3,13 @@
# Check FDB default-remote handling across "ip link set".
+# The test brings up a vxlan device on the default port, which fails where
+# the host already has one, as a metadata-based device holding that port is
+# not compatible with the one the test asks for:
+# RTNETLINK answers: Address already in use
+# Run in a fresh network namespace, like the netfilter tests do.
+[ "${1}" != "run" ] && { unshare -n "${0}" run; exit $?; }
+
check_remotes()
{
local what=$1; shift
--
2.43.0
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Devel] [PATCH hci-8.1 v3 2/5] selftests: net: skip what this kernel and iproute2 do not have
2026-09-22 15:00 [Devel] [PATCH hci-8.1 v3 0/5] selftests: net: make the net tests pass on a vz10 host Konstantin Khorenko
2026-09-22 15:00 ` [Devel] [PATCH hci-8.1 v3 1/5] selftests: net: run the fdb and bind tests in their own netns Konstantin Khorenko
@ 2026-09-22 15:00 ` Konstantin Khorenko
2026-09-22 15:00 ` [Devel] [PATCH hci-8.1 v3 3/5] selftests: net: install pmtu.sh, the script pmtu_wrapper.sh runs Konstantin Khorenko
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Konstantin Khorenko @ 2026-09-22 15:00 UTC (permalink / raw)
To: Eva Kurchatova; +Cc: devel
From: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
Five cases report a failure where a feature is simply not there.
tls asks for every cipher it knows and fails on the ones the kernel does
not implement, SM4 and ARIA, which answer ENOENT at setsockopt
time. Skip a cipher the kernel refuses that way; the run then reports
632 passed, 264 skipped and none failed.
rtnetlink.sh sets up an erspan tunnel, which this kernel does not have
and which fails with "Unknown device type", and checks a netconf dump
whose exit status iproute2 gets wrong: 6.11 exits 2 on a dump that
worked, 6.17 exits 0. Probe for both and skip when unusable.
rtnetlink.py asks for an IPv4 multicast address dump the kernel answers
with EOPNOTSUPP, and ip_local_port_range asks for protocols it does not
have. Skip those too.
https: //virtuozzo.atlassian.net/browse/VSTOR-139651
Feature: fix selftests
Signed-off-by: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
Reviewed-by: Vladimir Riabchun <vladimir.riabchun@virtuozzo.com>
---
tools/testing/selftests/net/ip_local_port_range.c | 17 ++++++++++---
tools/testing/selftests/net/rtnetlink.py | 11 ++++++--
tools/testing/selftests/net/rtnetlink.sh | 31 +++++++++++++++++++++++
tools/testing/selftests/net/tls.c | 2 ++
4 files changed, 55 insertions(+), 6 deletions(-)
diff --git a/tools/testing/selftests/net/ip_local_port_range.c b/tools/testing/selftests/net/ip_local_port_range.c
index 29451d2244b75..2d7b9c852b2b1 100644
--- a/tools/testing/selftests/net/ip_local_port_range.c
+++ b/tools/testing/selftests/net/ip_local_port_range.c
@@ -118,10 +118,6 @@ static int get_ip_local_port_range(int fd, __u32 *range)
FIXTURE(ip_local_port_range) {};
-FIXTURE_SETUP(ip_local_port_range)
-{
-}
-
FIXTURE_TEARDOWN(ip_local_port_range)
{
}
@@ -180,6 +176,19 @@ FIXTURE_VARIANT_ADD(ip_local_port_range, ip6_mptcp) {
.so_protocol = IPPROTO_MPTCP,
};
+FIXTURE_SETUP(ip_local_port_range)
+{
+ int fd;
+
+ /* Not every protocol under test is built into every kernel. */
+ fd = socket(variant->so_domain, variant->so_type, variant->so_protocol);
+ if (fd < 0 && (errno == EPROTONOSUPPORT || errno == ESOCKTNOSUPPORT ||
+ errno == EAFNOSUPPORT))
+ SKIP(return, "%s", strerror(errno));
+ ASSERT_GE(fd, 0) TH_LOG("socket failed");
+ close(fd);
+}
+
TEST_F(ip_local_port_range, invalid_option_value)
{
__u16 val16;
diff --git a/tools/testing/selftests/net/rtnetlink.py b/tools/testing/selftests/net/rtnetlink.py
index e9ad5e88da97f..e0b44902c602d 100755
--- a/tools/testing/selftests/net/rtnetlink.py
+++ b/tools/testing/selftests/net/rtnetlink.py
@@ -1,7 +1,9 @@
#!/usr/bin/env python3
# SPDX-License-Identifier: GPL-2.0
-from lib.py import ksft_exit, ksft_run, ksft_ge, RtnlAddrFamily
+from lib.py import ksft_exit, ksft_run, ksft_ge, KsftSkipEx
+from lib.py import NlError, RtnlAddrFamily
+import errno
import socket
IPV4_ALL_HOSTS_MULTICAST = b'\xe0\x00\x00\x01'
@@ -12,7 +14,12 @@ IPV4_ALL_HOSTS_MULTICAST = b'\xe0\x00\x00\x01'
At least the loopback interface should have this address.
"""
- addresses = rtnl.getmulticast({"ifa-family": socket.AF_INET}, dump=True)
+ try:
+ addresses = rtnl.getmulticast({"ifa-family": socket.AF_INET}, dump=True)
+ except NlError as e:
+ if e.nl_msg.error == -errno.EOPNOTSUPP:
+ raise KsftSkipEx("IPv4 multicast address dump is not supported")
+ raise
all_host_multicasts = [
addr for addr in addresses if addr['multicast'] == IPV4_ALL_HOSTS_MULTICAST
diff --git a/tools/testing/selftests/net/rtnetlink.sh b/tools/testing/selftests/net/rtnetlink.sh
index 5f72b447e9400..cc4e94b90002b 100755
--- a/tools/testing/selftests/net/rtnetlink.sh
+++ b/tools/testing/selftests/net/rtnetlink.sh
@@ -142,10 +142,30 @@ kci_del_dummy()
run_cmd ip link del dev "$devdummy"
}
+# Some iproute2 versions exit non-zero from a netconf dump that worked,
+# printing the devconf and then failing anyway. Nothing about the kernel
+# can be learned from the exit status of such an ip, so find out once.
+netconf_exit_status_usable()
+{
+ local out
+
+ out=$(ip -4 netconf show dev lo 2>/dev/null)
+ if [ $? -ne 0 ] && [ -n "$out" ]; then
+ return 1
+ fi
+ return 0
+}
+
kci_test_netconf()
{
dev="$1"
r=$ret
+
+ if ! netconf_exit_status_usable; then
+ end_test "SKIP: ip netconf $dev: iproute2 fails a dump that worked"
+ return $ksft_skip
+ fi
+
run_cmd ip netconf show dev "$dev"
for f in 4 6; do
run_cmd ip -$f netconf show dev "$dev"
@@ -920,6 +940,17 @@ kci_test_erspan()
return $ksft_skip
fi
+ # the kernel can be built without erspan, rtnetlink then has no ops
+ # for the type and says so. A kernel that has it gets past this and
+ # fails on the attributes the probe leaves out.
+ if ip -netns "$testns" link add dev "$DEV_NS" type erspan 2>&1 | \
+ grep -q "Unknown device type"; then
+ end_test "SKIP: erspan: not supported by the kernel"
+ ip netns del "$testns"
+ return $ksft_skip
+ fi
+ ip -netns "$testns" link del dev "$DEV_NS" 2>/dev/null
+
# test native tunnel erspan v1
run_cmd ip -netns "$testns" link add dev "$DEV_NS" type erspan seq \
key 102 local 172.16.1.100 remote 172.16.1.200 \
diff --git a/tools/testing/selftests/net/tls.c b/tools/testing/selftests/net/tls.c
index c9b0b4337e127..07f2b454d755b 100644
--- a/tools/testing/selftests/net/tls.c
+++ b/tools/testing/selftests/net/tls.c
@@ -413,6 +413,8 @@ FIXTURE_SETUP(tls)
return;
ret = setsockopt(self->fd, SOL_TLS, TLS_TX, &tls12, tls12.len);
+ if (ret < 0 && errno == ENOENT)
+ SKIP(return, "Cipher not built into the kernel");
ASSERT_EQ(ret, 0);
ret = setsockopt(self->cfd, SOL_TLS, TLS_RX, &tls12, tls12.len);
--
2.43.0
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Devel] [PATCH hci-8.1 v3 3/5] selftests: net: install pmtu.sh, the script pmtu_wrapper.sh runs
2026-09-22 15:00 [Devel] [PATCH hci-8.1 v3 0/5] selftests: net: make the net tests pass on a vz10 host Konstantin Khorenko
2026-09-22 15:00 ` [Devel] [PATCH hci-8.1 v3 1/5] selftests: net: run the fdb and bind tests in their own netns Konstantin Khorenko
2026-09-22 15:00 ` [Devel] [PATCH hci-8.1 v3 2/5] selftests: net: skip what this kernel and iproute2 do not have Konstantin Khorenko
@ 2026-09-22 15:00 ` Konstantin Khorenko
2026-09-22 15:00 ` [Devel] [PATCH hci-8.1 v3 4/5] selftests: net: mark test_ingress_egress_chaining.sh executable Konstantin Khorenko
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Konstantin Khorenko @ 2026-09-22 15:00 UTC (permalink / raw)
To: Eva Kurchatova; +Cc: devel
From: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
pmtu_wrapper.sh is a test program and does nothing but run pmtu.sh in a
namespace, yet pmtu.sh is in no install list, so an installed testsuite
has the wrapper without the script it needs:
exec of "./pmtu.sh" failed: No such file or directory
Add it to TEST_FILES.
https: //virtuozzo.atlassian.net/browse/VSTOR-139651
Feature: fix selftests
Signed-off-by: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
Reviewed-by: Vladimir Riabchun <vladimir.riabchun@virtuozzo.com>
---
tools/testing/selftests/net/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/net/Makefile b/tools/testing/selftests/net/Makefile
index 745fd2248b076..fa0173413ce53 100644
--- a/tools/testing/selftests/net/Makefile
+++ b/tools/testing/selftests/net/Makefile
@@ -110,6 +110,7 @@ TEST_GEN_FILES += $(YNL_GEN_FILES)
TEST_FILES := settings
TEST_FILES += in_netns.sh lib.sh net_helper.sh setup_loopback.sh setup_veth.sh
+TEST_FILES += pmtu.sh
TEST_GEN_FILES += $(patsubst %.c,%.o,$(wildcard *.bpf.c))
--
2.43.0
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Devel] [PATCH hci-8.1 v3 4/5] selftests: net: mark test_ingress_egress_chaining.sh executable
2026-09-22 15:00 [Devel] [PATCH hci-8.1 v3 0/5] selftests: net: make the net tests pass on a vz10 host Konstantin Khorenko
` (2 preceding siblings ...)
2026-09-22 15:00 ` [Devel] [PATCH hci-8.1 v3 3/5] selftests: net: install pmtu.sh, the script pmtu_wrapper.sh runs Konstantin Khorenko
@ 2026-09-22 15:00 ` Konstantin Khorenko
2026-09-22 15:00 ` [Devel] [PATCH hci-8.1 v3 5/5] ms/tunnels: Drop stale dst when building an ICMP error for PMTUD Konstantin Khorenko
2026-09-22 15:05 ` [Devel] [PATCH hci-8.1 v3 0/5] selftests: net: make the net tests pass on a vz10 host Konstantin Khorenko
5 siblings, 0 replies; 7+ messages in thread
From: Konstantin Khorenko @ 2026-09-22 15:00 UTC (permalink / raw)
To: Eva Kurchatova; +Cc: devel
From: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
The script is listed in TEST_PROGS but, alone among the tests in that
directory, is not executable. The runner copes: it falls back to the
interpreter named in the shebang, so the test does run, and the only
trace is a line in the log
# Warning: file test_ingress_egress_chaining.sh is not executable
Anything that runs the script itself, rather than through the runner,
needs the bit. Set it.
https: //virtuozzo.atlassian.net/browse/VSTOR-139651
Feature: fix selftests
Signed-off-by: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
Reviewed-by: Vladimir Riabchun <vladimir.riabchun@virtuozzo.com>
---
tools/testing/selftests/net/test_ingress_egress_chaining.sh | 0
1 file changed, 0 insertions(+), 0 deletions(-)
diff --git a/tools/testing/selftests/net/test_ingress_egress_chaining.sh b/tools/testing/selftests/net/test_ingress_egress_chaining.sh
old mode 100644
new mode 100755
--
2.43.0
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Devel] [PATCH hci-8.1 v3 5/5] ms/tunnels: Drop stale dst when building an ICMP error for PMTUD
2026-09-22 15:00 [Devel] [PATCH hci-8.1 v3 0/5] selftests: net: make the net tests pass on a vz10 host Konstantin Khorenko
` (3 preceding siblings ...)
2026-09-22 15:00 ` [Devel] [PATCH hci-8.1 v3 4/5] selftests: net: mark test_ingress_egress_chaining.sh executable Konstantin Khorenko
@ 2026-09-22 15:00 ` Konstantin Khorenko
2026-09-22 15:05 ` [Devel] [PATCH hci-8.1 v3 0/5] selftests: net: make the net tests pass on a vz10 host Konstantin Khorenko
5 siblings, 0 replies; 7+ messages in thread
From: Konstantin Khorenko @ 2026-09-22 15:00 UTC (permalink / raw)
To: Eva Kurchatova; +Cc: devel
From: Ido Schimmel <idosch@nvidia.com>
Bridged UDP tunnels such as VXLAN and GENEVE build an ICMP error packet
around an overlay packet if the packet is going to exceed the underlay
path MTU. The ICMP error packet is then injected back into the Rx path
with the source and destination addresses swapped, so that it will be
delivered to the overlay source.
If the overlay packet was routed to the UDP tunnel or locally generated,
then it is already carrying a valid dst entry and this entry is not
dropped when transforming the packet to an ICMP error packet. This
causes the IP layer to reuse the dst entry, leading to the ICMP error
packet being dropped or routed out of the UDP tunnel interface in case
of forwarding.
Prior to the blamed commit this could not happen, as
skb_tunnel_check_pmtu() did not build ICMP errors for PACKET_HOST
packets. Such packets were instead encapsulated and, unless the DF bit
was set in the outer header, fragmented by the underlay.
Fix this by making sure that the ICMP error packet does not have a valid
dst entry, thereby forcing the IP layer to perform a route lookup.
Adjust the bridged PMTU exception selftests accordingly. When the
local sender in ns_a pings the overlay destination with a deadline
(-w), ping exits on the first socket error before any reply is
received and returns a non-zero exit code. The test therefore only
passed because the ICMP error was never delivered. Use a packet count
(-c) like the ns_c line above it, so that the ICMP error counts
against the packet budget and the exit code depends on whether echo
replies were received. This passes with and without the fix.
Fixes: 8930424777e4 ("tunnels: Accept PACKET_HOST in skb_tunnel_check_pmtu().")
Cc: stable@vger.kernel.org
Reported-by: Laika Price <laikabcprice@gmail.com>
Closes: https://lore.kernel.org/netdev/20260614-master-v3-1-9f5060ba1ed1@gmail.com/
Reported-by: Yaroslav Dudkov <aroslavdudkov622@gmail.com>
Closes: https://lore.kernel.org/netdev/20260901081825.287173-1-aroslavdudkov622@gmail.com/
Reported-by: Charles Bordet <rough.rock3059@datachamp.fr>
Closes: https://lore.kernel.org/netdev/aHVhQLPJIhq-SYPM@eldamar.lan/
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Tested-by: Yaroslav Dudkov <aroslavdudkov622@gmail.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
Reviewed-by: Guillaume Nault <gnault@redhat.com>
Link: https://patch.msgid.link/20260902190112.4126199-1-idosch@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit b58d749633203d92c265317b45fccee555090352)
https://virtuozzo.atlassian.net/browse/VSTOR-139651
Feature: fix ms/net
Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
---
net/ipv4/ip_tunnel_core.c | 6 ++++++
tools/testing/selftests/net/pmtu.sh | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/net/ipv4/ip_tunnel_core.c b/net/ipv4/ip_tunnel_core.c
index 8392d304a72eb..7e0f0291b7d56 100644
--- a/net/ipv4/ip_tunnel_core.c
+++ b/net/ipv4/ip_tunnel_core.c
@@ -252,6 +252,9 @@ static int iptunnel_pmtud_build_icmp(struct sk_buff *skb, int mtu)
eth_header(skb, skb->dev, ntohs(eh.h_proto), eh.h_source, eh.h_dest, 0);
skb_reset_mac_header(skb);
+ if (skb_valid_dst(skb))
+ skb_dst_drop(skb);
+
return skb->len;
}
@@ -348,6 +351,9 @@ static int iptunnel_pmtud_build_icmpv6(struct sk_buff *skb, int mtu)
eth_header(skb, skb->dev, ntohs(eh.h_proto), eh.h_source, eh.h_dest, 0);
skb_reset_mac_header(skb);
+ if (skb_valid_dst(skb))
+ skb_dst_drop(skb);
+
return skb->len;
}
diff --git a/tools/testing/selftests/net/pmtu.sh b/tools/testing/selftests/net/pmtu.sh
index 6c651c880fe83..19b9e099b06bd 100755
--- a/tools/testing/selftests/net/pmtu.sh
+++ b/tools/testing/selftests/net/pmtu.sh
@@ -1409,7 +1409,7 @@ test_pmtu_ipvX_over_bridged_vxlanY_or_geneveY_exception() {
mtu "${ns_b}" ${type}_b $((${ll_mtu} + 1000))
run_cmd ${ns_c} ${ping} -q -M want -i 0.1 -c 10 -s $((${ll_mtu} + 500)) ${dst} || return 1
- run_cmd ${ns_a} ${ping} -q -M want -i 0.1 -w 1 -s $((${ll_mtu} + 500)) ${dst} || return 1
+ run_cmd ${ns_a} ${ping} -q -M want -i 0.1 -c 10 -s $((${ll_mtu} + 500)) ${dst} || return 1
# Check that exceptions were created
pmtu="$(route_get_dst_pmtu_from_exception "${ns_c}" ${dst})"
--
2.43.0
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Devel] [PATCH hci-8.1 v3 0/5] selftests: net: make the net tests pass on a vz10 host
2026-09-22 15:00 [Devel] [PATCH hci-8.1 v3 0/5] selftests: net: make the net tests pass on a vz10 host Konstantin Khorenko
` (4 preceding siblings ...)
2026-09-22 15:00 ` [Devel] [PATCH hci-8.1 v3 5/5] ms/tunnels: Drop stale dst when building an ICMP error for PMTUD Konstantin Khorenko
@ 2026-09-22 15:05 ` Konstantin Khorenko
5 siblings, 0 replies; 7+ messages in thread
From: Konstantin Khorenko @ 2026-09-22 15:05 UTC (permalink / raw)
To: Eva Kurchatova, Konstantin Khorenko; +Cc: devel
On Tue, 22 Sep 2026 17:00:43 +0200, Konstantin Khorenko wrote:
> selftests: net: make the net tests pass on a vz10 host
>
> This is Eva's series as reviewed on the list, with the two changes below
> made while applying, so that the version on the list is the one in the
> tree.
>
> The net selftests fail on a vz10 host for reasons unrelated to the code
> under test: the vxlan Open vSwitch keeps on port 4789, sockets other
> services hold on 0.0.0.0, features this kernel does not have (erspan is
> disabled under CONFIG_VE, the SM4 and ARIA ciphers are not built), an
> iproute2 that fails a netconf dump that worked, and an installed
> testsuite without the script its wrapper runs. Patches 1-4 fix the
> tests for each of these.
>
> [...]
Applied to branch-rh10-6.12.0-211.52.1.22.x.vz10-ovz, will be released in rh10-6.12.0-211.52.1.22.2.vz10, thanks!
[1/5] selftests: net: run the fdb and bind tests in their own netns
https://bitbucket.org/virtuozzocore/vzkernel.vzs/commits/b97a48909cd1
[2/5] selftests: net: skip what this kernel and iproute2 do not have
https://bitbucket.org/virtuozzocore/vzkernel.vzs/commits/0a508275fdd1
[3/5] selftests: net: install pmtu.sh, the script pmtu_wrapper.sh runs
https://bitbucket.org/virtuozzocore/vzkernel.vzs/commits/b309c231ec93
[4/5] selftests: net: mark test_ingress_egress_chaining.sh executable
https://bitbucket.org/virtuozzocore/vzkernel.vzs/commits/4555783923b0
[5/5] ms/tunnels: Drop stale dst when building an ICMP error for PMTUD
https://bitbucket.org/virtuozzocore/vzkernel.vzs/commits/9879e124357d
--
Konstantin Khorenko <khorenko@virtuozzo.com>
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-09-22 15:06 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-22 15:00 [Devel] [PATCH hci-8.1 v3 0/5] selftests: net: make the net tests pass on a vz10 host Konstantin Khorenko
2026-09-22 15:00 ` [Devel] [PATCH hci-8.1 v3 1/5] selftests: net: run the fdb and bind tests in their own netns Konstantin Khorenko
2026-09-22 15:00 ` [Devel] [PATCH hci-8.1 v3 2/5] selftests: net: skip what this kernel and iproute2 do not have Konstantin Khorenko
2026-09-22 15:00 ` [Devel] [PATCH hci-8.1 v3 3/5] selftests: net: install pmtu.sh, the script pmtu_wrapper.sh runs Konstantin Khorenko
2026-09-22 15:00 ` [Devel] [PATCH hci-8.1 v3 4/5] selftests: net: mark test_ingress_egress_chaining.sh executable Konstantin Khorenko
2026-09-22 15:00 ` [Devel] [PATCH hci-8.1 v3 5/5] ms/tunnels: Drop stale dst when building an ICMP error for PMTUD Konstantin Khorenko
2026-09-22 15:05 ` [Devel] [PATCH hci-8.1 v3 0/5] selftests: net: make the net tests pass on a vz10 host Konstantin Khorenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox