From patchwork Tue Nov 17 10:45:37 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Bailetti X-Patchwork-Id: 5722 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:6022:9292:b0:11a:f58a:e788 with SMTP id dc18csp2397298lab; Tue, 17 Nov 2026 02:46:23 -0800 (PST) X-Forwarded-Encrypted: i=2; AL+hErEp5O9B+C2oH2EkKALTUNWReZX6Yn+r+4gZ61A7CYON407mPSFOO2w7/+WLylaQn2CYacR31ECYTTo=@openvpn.net X-Received: by 2002:a05:7301:b06:b0:376:13e5:e8fe with SMTP id 5a478bee46e88-37964b08f4cmr12057058eec.3.1794912382788; Tue, 17 Nov 2026 02:46:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1794912382; cv=none; d=google.com; s=arc-20260327; b=tDoXe5jXapdZNq9ikSOyRlesjbrlM3rL6r+NyWBj5nJyB+l79zVgL/7kNGJeyWak3O uzFnYHzIf6+bvbphmZrZbNXO1zaoxBXPEZW4HD+uBoD89OPfyMqx5VvyOObtzq38d0Ua RVPV1KLyIYacmg5vC37ToLuJ5ZcoDBevwDj7GyFRar9ZnSI4NySet7Lk/b6RKn3rh0oG CzCZXPiJNRUzXa1dwBHW34Wi+Z2X/EyWCpTFudBBISXWfExOBpPBxgG2RshwhuBTOaef MXFvJlpuTx2KmEmVwdMyvDR93HtG+qE7Pt29KG6OkqTe0nTt/V9qD1SkVnxrunmwJc0C eWGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=errors-to:content-transfer-encoding:cc:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:dkim-signature:dkim-signature:dkim-signature; bh=XFA0Bk/KtY7f2a8EOwLpT74kymS3OwCX8ToMNLpoqzI=; fh=10tBNjXj/wkJoIBSfHvI5xr4knRr+m5zCVrzABMRuHI=; b=WEL3E9E7mZ3OsRr7Dn7wWZJGH9PRvpqId3H47fBcMDFvcS86gf5wZj9Xlgh6R/W1Fr uGwCvqdJPnVV6uvMtzTP5gWM0w9WxdB6jRNixuTPf0v08yOaGhZ8qKvHrTPR96nhVWqZ RCTVEXzWprbOwfvklXLkbnWKj0GfPdeuQ6USh1Ye7Y3UPh1g+Je7pVMpYMePfhZW5qCJ 3o4uapHOLMXO6Zw8z/UIMmwzOo/OLZTNOtePt3AlWqBWAxBvIeP6j6Y7snAC01ETxpXk YV40jtQQ/Hq7AtJ2T8uHEXxAE762Ielra0vWQxORg9F5AstIrjULBO/Z76/8F75UU3X+ yZrw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=D2CUmvYu; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=TNmKN9Vp; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b="NhV/vSZE"; dkim=neutral (body hash did not verify) header.i=@nethesis.it header.s=default header.b=GyCA85JT; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nethesis.it Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id 5a478bee46e88-38120650a19si5254652eec.42.2026.11.17.02.46.22 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Nov 2026 02:46:22 -0800 (PST) Received-SPF: pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) client-ip=216.105.38.7; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=D2CUmvYu; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=TNmKN9Vp; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b="NhV/vSZE"; dkim=neutral (body hash did not verify) header.i=@nethesis.it header.s=default header.b=GyCA85JT; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nethesis.it DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.sourceforge.net; s=beta; h=Content-Transfer-Encoding:Content-Type:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Subject:MIME-Version:References:In-Reply-To:Message-ID:Date:To:From:Sender: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:List-Unsubscribe-Post:List-Owner; bh=XFA0Bk/KtY7f2a8EOwLpT74kymS3OwCX8ToMNLpoqzI=; b=D2CUmvYuTetv+lQLX1bi5ijEQ1 HukNbnVnN2BPPve5X05KP2sVXpzuYKA1YFuotscERKf9/PG3Xb90qREq6Bvry8an/kGKVT2+MrALW +aLQB0mzgNBghOuJZgCgWjmWEIFoEWiBpdveqtsq4nuz7po/LNoGgMpEX480+dKgMIW8=; Received: from [127.0.0.1] (helo=sfs-ml-3.v29.lw.sourceforge.com) by sfs-ml-3.v29.lw.sourceforge.com with esmtp (Exim 4.100.1) (envelope-from ) id 1xTGhh-000000005na-1h4u; Tue, 17 Nov 2026 10:46:21 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-3.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.100.1) (envelope-from ) id 1xTGhg-000000005n4-2M6o for openvpn-devel@lists.sourceforge.net; Tue, 17 Nov 2026 10:46:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Unsubscribe-Post:List-Subscribe:List-Post:List-Owner:List-Archive; bh=NPQINTVYPKt/kniK1PfEJVSwySQ3NVcb7U4+NDiRnaE=; b=TNmKN9VpfwBHMYfP3kWK9Y8I3A l8f6kYA/fYt0usqzpawr2Yo0a58v84/XZf9nPwjL9xwGw2oLQikTR4BT85tq6PrQVkTR/mkF8q0Yo 2v1gSBptnuQluGhbKG8Xpvu5b7vIutow4vin0QZusT8vUyJt6ohatUyw1ZJI45gDYz9c=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Unsubscribe-Post: List-Subscribe:List-Post:List-Owner:List-Archive; bh=NPQINTVYPKt/kniK1PfEJVSwySQ3NVcb7U4+NDiRnaE=; b=NhV/vSZE7kEY3gkzpGwo+bjiKp /P1irUIZTg5ZayYmpJjeuuvJg36+kjtCcgkI1p5Be8GvGGuwdiuwxFiBH83uUOlnzOtcRrIkFEA2S g60T5+zxPy5EqEbVyzDk1MXxk7eiFF7TK6bj08y36mRrTp2xJG7d4D2yXodSeHz3TGxA=; Received: from nethservice.nethesis.it ([2.119.67.170]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.100.1) id 1xTGhD-000000002QS-43oy for openvpn-devel@lists.sourceforge.net; Tue, 17 Nov 2026 10:45:54 +0000 Received: from probook445g10.fritz.box (unknown [10.9.9.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519MLKEM768 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by nethservice.nethesis.it (Postfix) with ESMTPSA id D4E7A3592E2; Tue, 17 Nov 2026 10:45:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nethesis.it; s=default; t=1794912344; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NPQINTVYPKt/kniK1PfEJVSwySQ3NVcb7U4+NDiRnaE=; b=GyCA85JTCespgB8H2hkx47O1GKD6UcN50uDdxxcM9WwW6UYAfa51fVirWtHrw/p7KWGjVC 6cF+1WuTgejfFMCterIkyMjkAPrukpnn/OAN+cJtQdyQybHUi0mQV4xtqBj49piW6PmnEr 3EHma2eUBEpEsNrJ62/+M4cIqhJsBUZoYTQ7rmO2R8QLUfhtWp5ZJhVxNtu2TUBhYjFmtz 3jHFsXs2KeLsJJ1LNc6JF+MhAdf4IVb+z6xWw4DDp4SY5Q+iDK0hIw/crAGmEs6Zmeev4k TDD6Cnlizv7FEX/njovCLxn38umTbLNk4lQEHdYcVVVCyvLUq7t1yuNfVq3RXg== From: Tommaso Bailetti To: openvpn-devel@lists.sourceforge.net Date: Tue, 17 Nov 2026 11:45:37 +0100 Message-ID: <20261117104537.317440-1-tommaso.bailetti@nethesis.it> X-Mailer: git-send-email 2.56.1 In-Reply-To: References: MIME-Version: 1.0 X-Rspamd-Flag-Threshold: 6 X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "sfi-spamd-2.hosts.colo.sdot.me", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: When DCO is enabled print_status() bails out if dco_get_peer_stats() fails, without writing anything. On a client this happens during the whole reconnect after a ping-restart, since there's no DCO int [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Headers-End: 1xTGhD-000000002QS-43oy Subject: [Openvpn-devel] [PATCH v1] dco: always print the status block X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Antonio Quartulli Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: 1882102046485431013 X-GMAIL-MSGID: 1882102046485431013 When DCO is enabled print_status() bails out if dco_get_peer_stats() fails, without writing anything. On a client this happens during the whole reconnect after a ping-restart, since there's no DCO interface, so the management "status" command never gets an answer, not even "END", and the --status file isn't updated either. Print the status anyway. On a real DCO error SIGUSR1 is still raised by dco_get_peer_stats(), so the session restart keeps working. GitHub: closes OpenVPN/openvpn#1146 Change-Id: I831224f06e2f35bfcc9d0fec7d8edfc344c59406 Signed-off-by: Tommaso Bailetti Acked-by: Antonio Quartulli Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2201 --- This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master. Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2201 This mail reflects revision 1 of this Change. Acked-by according to Gerrit (reflected above): Antonio Quartulli diff --git a/src/openvpn/sig.c b/src/openvpn/sig.c index 0cdb01a..8ea756c 100644 --- a/src/openvpn/sig.c +++ b/src/openvpn/sig.c @@ -483,10 +483,7 @@ if (dco_enabled(&c->options)) { - if (dco_get_peer_stats(c, true) < 0) - { - return; - } + dco_get_peer_stats(c, true); } status_printf(so, "OpenVPN STATISTICS");