Article View: linux.kernel.netdev
Article #2885Re: [PATCH net-next 4/6] selftests: ovpn: enable TCP_NODELAY on TCP sockets
From: netdev-bot+sashiko
Date: Tue, 13 Oct 2026 14:39
Date: Tue, 13 Oct 2026 14:39
90 lines
8547 bytes
8547 bytes
Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider.
Critical: 0 ยท High: 0 ยท Medium: 1 ยท Low: 0
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] After this patch, no TCP selftest checks the TX peer-ID that
goes out on the wire.
--
selftests: ovpn: enable TCP_NODELAY on TCP sockets
This commit makes ovpn-cli set TCP_NODELAY on its TCP sockets by default.
Setting OVPN_TCP_NODELAY=0 turns it off, and the new test-tcp-nagle.sh
uses that to keep running the TCP suite with Nagle enabled. It also limits
the tcpdump-based peer ID check in ovpn_run_basic_traffic() to UDP.
> diff --git a/tools/testing/selftests/net/ovpn/test.sh b/tools/testing/selftests/net/ovpn/test.sh
> index 392109d5e14e2..e2e6ffdd29bb0 100755
> --- a/tools/testing/selftests/net/ovpn/test.sh
> +++ b/tools/testing/selftests/net/ovpn/test.sh
> @@ -137,35 +137,33 @@ ovpn_run_basic_traffic() {
> local tcpdump_timeout="1.5s"
>
> for p in $(seq 1 ${OVPN_NUM_PEERS}); do
[ ... ]
> if [ "${OVPN_PROTO}" == "UDP" ]; then
[ ... ]
> @@ -173,8 +171,10 @@ ovpn_run_basic_traffic() {
> ip netns exec ovpn_peer0 \
> ping -qfc 100 -s 3000 -w 3 5.5.5.$((p + 1))
>
> - wait "${tcpdump_pid1}" || return 1
> - wait "${tcpdump_pid2}" || return 1
> + if [ "${OVPN_PROTO}" == "UDP" ]; then
> + wait "${tcpdump_pid1}" || return 1
> + wait "${tcpdump_pid2}" || return 1
> + fi
> done
> }
[Severity: Medium]
This patch removes the TCP branch of ovpn_build_capture_filter() and makes
these waits UDP-only. After that, does any TCP selftest still check the
peer-id that goes out on the wire?
The capture was added by commit 367f4b163a8c ("selftests: ovpn: check
asymmetric peer-id"). Its purpose was to check the peer-id in the data
packet headers for every connection, TCP included.
On the kernel side, the TCP receive path never reads the peer-id from the
packet. It takes the peer that is bound to the socket:
drivers/net/ovpn/tcp.c:ovpn_tcp_rcv() {
...
ovpn_recv(peer, skb);
...
}
So if a TCP peer had the wrong tx_id here, traffic would still flow:
drivers/net/ovpn/crypto_aead.c:ovpn_aead_encrypt() {
...
op = ovpn_opcode_compose(OVPN_DATA_V2, ks->key_id, peer->tx_id);
...
}
The JSON expectations in the selftest directory don't compare tx-id
either. With this change, test-tcp.sh, test-symmetric-id-tcp.sh and the new
test-tcp-nagle.sh would all pass with an incorrect TCP tx_id.
The later patch in the series ("selftests: ovpn: wait for the TCP server
key setup before traffic") does not bring the TCP check back.
Could these TCP variants keep some form of peer-id check that does not
depend on TCP segment boundaries?
--
Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261012133809.2477063-1-antonio%40openvpn.net
Technical Details
Message-ID:
<179190238850.434549.6180086091448145830@kernel.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-345693-linux-kernel-netdev=dewy.ruReferences:
<20261012133809.2477063-5-antonio@openvpn.net>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-345693-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next 4/6] selftests: ovpn: enable TCP_NODELAY on TCP sockets Date: Tue, 13 Oct 2026 14:39:48 +0000 Organization: Usenet Network Message-ID: <179190238850.434549.6180086091448145830@kernel.org> References: <20261012133809.2477063-5-antonio@openvpn.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="2134126"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:BnjiACK1qcOCEa0U+y1h4vA73BQ= sha256:/mlIpuNt5JK3CJQ/tpvjZvn0gBU9UNyp6mIjGCheYMY= sha1:kUF90SBSvwqbkgR+Y2Q5aP5iMXw= sha256:By33a98OWGZceXRyif92Sqn/TBdBsyTFLHI7krJT5kw= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 1D18F10FEDC; Tue, 13 Oct 2026 22:22:29 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -1.34 X-Spam-Status: No, score=-1.34 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.24, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 59Rna-yk1IQH; Tue, 13 Oct 2026 22:22:24 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-345693-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 9C94710FEDA; Tue, 13 Oct 2026 22:22:15 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id E1C2A66029; Tue, 13 Oct 2026 14:45:45 +0000 (UTC) X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 23C93511204; Tue, 13 Oct 2026 14:39:51 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="bkG4PJbN" X-Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DEBFB40F73A for <netdev@vger.kernel.org>; Tue, 13 Oct 2026 14:39:49 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791902391; cv=none; b=nVguPmi/KbJh+hHlar+7M0bTmIkuUHsZwcYTvpivEunHTNQ3bi0nnjQgdrfu3C9DM/qQ4lxSX1pJO+KdcJRjK18m0Ttim6uttLb+MDMPfQoxzOk5VAVvpgdw3ZbvOlROCflg0EqscS7bsocHnhnJ27qjv8/cjoIwqEp7BqrTNjQ= X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791902391; c=relaxed/simple; bh=x4JXlDlGmqWY5EW+2edkOtzPjV1b+03YQOwDIz+jHdo=; h=Subject:From:To:Cc:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=ATesPAa4VG0KbgP/uZ0XCnKo+yrBzolOFiwuoex0BBYBoJgulgjZ7En+otWc9/QdfqvPHj68ADNac0A2eS+TbXa/VRC1QZLW1fcsCsOYZyUAIWyPvIr44xOX0jAcUXdz5zBBokLp//npZE7QzdH70UHxJNJVF0t5H0/nijOn/KA= X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=bkG4PJbN; arc=none smtp.client-ip=100.103.45.18 X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 006FB1F000FF; Tue, 13 Oct 2026 14:39:48 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1791902389; bh=jdOmbyKW1BXVliYEEyAVtWpOSyYPCb1tNiqls9Wke5M=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=bkG4PJbNHB1fX6XQ8GE7WIqmgK3R3d9abb3nMS/pYz2iev3QCpkTQQz11ROGPGIy1 eLMgaeb6S4Hufub/HwtpeFLngpsHqrh6oVvfjuZ/Pe/PKBBo6NAktC+VIJFHsnSYRD 1vWauesjES7DJ3Mt+95mf3f08uv/ScBnHzuAvsXXmhFs2kUVvAB2gCLEKVIpqTbFFT 5N2baHIhxweaRB7nBetbOucB5ZYydEx+IdPkgHydntYa3Ns+6/E6EX1K2+xD+nGGtl uacBqjW/3nAdOgUv2UAR2s/IdwNGxAWsMqgwo9B0usK4AiOj48/Jfjxvuu9FTVFUgF zKoOAiN2ixaBw== X-Cc: netdev@vger.kernel.org, sd@queasysnail.net, ralf@mandelbit.com, kuba@kernel.org, pabeni@redhat.com, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com X-In-Reply-To: <20261012133809.2477063-5-antonio@openvpn.net> X-sashiko-severity: Medium X-Precedence: bulk X-Mailing-List: netdev@vger.kernel.org X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>