From patchwork Fri Nov 7 14:13:27 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 4570 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:d11a:b0:7b1:1082:6501 with SMTP id lw26csp539332mab; Fri, 7 Nov 2025 06:13:49 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCULEYpWmZiTPc/cd4AEu1iAde4Ibc6YMyj1fYFby1gCm4pJGWeMDSUxrPn/ZLQRAC+SEOQyoaIZmvE=@openvpn.net X-Google-Smtp-Source: AGHT+IGYv1ebOdmchusvbR6Ga8zS1hPO0RzRuQswGACzqTrya+bUAl+JATd8IyarTAK5KY4RbWrs X-Received: by 2002:a05:6808:810f:b0:450:1eaf:ee2a with SMTP id 5614622812f47-4501eb01050mr614187b6e.54.1762524829321; Fri, 07 Nov 2025 06:13:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1762524829; cv=none; d=google.com; s=arc-20240605; b=SGIiuBOG5U4EVK3h1wEuNwmcmG4fFS5H1xTwYGaJ1so870yrf2iV0AblVfaTHppJfN U/A/ZxOCupLtqChQqeYiMdb6cTltsU7KshJ8WX4dbccjKRL5/+c99ueq/EgsVOZSnYjw NybYclkaJkCQSEvZXBj45ona3uEVcteWDXrouus/MmLvdudmcppvEBYPRXp3E6PsnYvY JYPXGyjQWKDj7lR8yYH412eYJJbfBtUfoMUrfqcyPNiGtSEqVy62jqZ3T7crTU8jCdTw mMb207rjj5oLBRvIeYtM/G9KQh5CUccB+6e78fpKUdguq+FeVomiJ0ejQbmXOEyZXa0+ QZzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:content-transfer-encoding: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; bh=D1WWXjJZuAsmoTtNr483d6wawGhR+fq8ehaRBG6lmU8=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=OUw8inwuFN9gVAk+JZ5YhVBXdWtHIdDvqZzkbExXHqwpPPI/vhmhQv/Ygm8Rq9/Ski iPX6SA0uSJkOcWVwKfdhNHSoeEc67Scr9UVMer2vh+9nUqRKZcwQdcJUJIRBLsEdzooW RbCLoV9frQaQBpb72ieZbWn53G7fdiGrJcrDCj81ONYF2E3bootucKDRaPs70x0u7NYf OeAqVwszWDNvJK0ZHkrbE0Yk+hgaWAAJmzrNT+3Wh8Tk6nV+tKnNDliXPWfKpxmnkuSf eItVCu2++5yjoictI/8YN669MCAgh7ZoFwPg8MZ6Uc0q0bJ2YxO8Qk/9WY/FGQXOepnM FFoQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=SfWUWJmX; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=FmN5r64k; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=D5yeBtLA; 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=muc.de Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id 5614622812f47-45002a197e6si1799817b6e.351.2025.11.07.06.13.48 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Nov 2025 06:13:48 -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=SfWUWJmX; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=FmN5r64k; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=D5yeBtLA; 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=muc.de 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: 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:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=D1WWXjJZuAsmoTtNr483d6wawGhR+fq8ehaRBG6lmU8=; b=SfWUWJmXKi5d8/evAcIhIsS+xM 3ax2h9FptpOfCS1GCU9nEG3RuBJLxThfMXxizs1TO16vdPd7eVA0WlD4SX1GR/BuHw+DPG0BIMRXG p185W6keSZ2UMjixMm7LxQJTFOsKF4QEj1tg2RgOWjUIGozS9vSMQ+d+Zaa5IXe/OT4M=; Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1vHNDl-0007fn-3T; Fri, 07 Nov 2025 14:13:45 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1vHNDj-0007fO-K2 for openvpn-devel@lists.sourceforge.net; Fri, 07 Nov 2025 14:13:44 +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:To:From:Sender:Reply-To:Cc: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-Subscribe:List-Post:List-Owner:List-Archive; bh=qtRp5+IpI8uqthzERu/USPiUX0EmXY1pXtJmMRMlpBU=; b=FmN5r64kmF1S6Z0UWWKQpcgM8V PiAzWSAf7MkEwRfbushHSy7e8aTPplGYVtftMJ7+ZMY8OqM2AW8Nihn5YE22ZdBTfaWR9E/C2h7C+ ZUt+kLYGgGO6jbfUCKfRD6O/gL7VFS6if/yR2n9lvhM4BxsG42fYTqWgXLVujNTMXRxs=; 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:To:From:Sender:Reply-To:Cc: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-Subscribe: List-Post:List-Owner:List-Archive; bh=qtRp5+IpI8uqthzERu/USPiUX0EmXY1pXtJmMRMlpBU=; b=D5yeBtLAssWRtzZX4mDOVcvAIi o9PMT7UF8RtTfX73PHXd+kSpqLcLcbqpRLUWVnMYw59ZUVS+Ie8ZeeUTWHRcRDlnOKcUAt4/p7MKx 0lcJyrqIPJGffgjmmVm+UYrPkON564rMEkcM9viZrHVYPoctqr19dvBAc/Tpv4T712MM=; Received: from [193.149.48.134] (helo=blue.greenie.muc.de) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1vHNDh-0000FP-5K for openvpn-devel@lists.sourceforge.net; Fri, 07 Nov 2025 14:13:42 +0000 Received: from blue.greenie.muc.de (localhost [127.0.0.1]) by blue.greenie.muc.de (8.18.1/8.18.1) with ESMTP id 5A7EDX9P012073 for ; Fri, 7 Nov 2025 15:13:33 +0100 Received: (from gert@localhost) by blue.greenie.muc.de (8.18.1/8.18.1/Submit) id 5A7EDXNX012072 for openvpn-devel@lists.sourceforge.net; Fri, 7 Nov 2025 15:13:33 +0100 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Fri, 7 Nov 2025 15:13:27 +0100 Message-ID: <20251107141333.12056-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.49.1 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Score: 1.3 (+) 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: commit 4a48841da2 introduced a workaround for spurious DCO notifications "with no useful content" on Linux - namely, ignoring dco_message_type==0 in forward.c, process_incoming_dco(), "because Linux h [...] Content analysis details: (1.3 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-Headers-End: 1vHNDh-0000FP-5K Subject: [Openvpn-devel] [PATCH v3] FreeBSD DCO: repair incoming "delete peer" notifications in p2p client mode 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: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1848141235465365063?= X-GMAIL-MSGID: =?utf-8?q?1848141235465365063?= commit 4a48841da2 introduced a workaround for spurious DCO notifications "with no useful content" on Linux - namely, ignoring dco_message_type==0 in forward.c, process_incoming_dco(), "because Linux has no message type 0 anyway". Each DCO platform uses its own enum for these notification messages *inside* OpenVPN (which might not have the best design decision ever), and FreeBSD had OVPN_CMD_DEL_PEER in the enum on "position 0"... Fix by changing the enum to start with 1. Tested with DEL_PEER in p2p client and DEL_PEER & FLOAT in p2mp server mode. v2: introduce OVPN_CMD_NO_MESSAGE in position 0, and a comment explaining why. A future commit can then clean up forward.c and dco_linux.c to use the constant, and not "magic 0 which happens to be in there after CLEAR()". Github: fixes OpenVPN/openvpn#881 Change-Id: I991d6053776efed771bc1a3880acb80b55959cbc Signed-off-by: Gert Doering Acked-by: Frank Lichtenheld Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1353 --- 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/+/1353 This mail reflects revision 3 of this Change. Acked-by according to Gerrit (reflected above): Frank Lichtenheld diff --git a/src/openvpn/dco_freebsd.h b/src/openvpn/dco_freebsd.h index 0797b82..5e2a552 100644 --- a/src/openvpn/dco_freebsd.h +++ b/src/openvpn/dco_freebsd.h @@ -33,6 +33,8 @@ enum ovpn_message_type_t { + /* message type #0 is treated as magic number by process_incoming_dco() */ + OVPN_CMD_NO_MESSAGE = 0, OVPN_CMD_DEL_PEER, OVPN_CMD_PACKET, OVPN_CMD_SWAP_KEYS,