From patchwork Thu Sep 11 20:12:16 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 4400 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:b149:b0:671:5a2c:6455 with SMTP id s9csp3389454maw; Thu, 11 Sep 2025 13:12:42 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWnFOuvyC0uJPPjIxnPgx/2jxt46ukGXrpVwkVD1aon3GeRqzJFqePIwBsd/Cy4L5V4I2cyAq6YgaA=@openvpn.net X-Google-Smtp-Source: AGHT+IHmWtcMdutPyYo/CJOb1Q63t/cY2xHsfOhQeH1Hg4tpxKexIrD2dGrfp1/pHYZ4i+7naR2m X-Received: by 2002:a05:6830:3c04:b0:748:cb89:c1f2 with SMTP id 46e09a7af769-753552d8d00mr360845a34.17.1757621562172; Thu, 11 Sep 2025 13:12:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1757621562; cv=none; d=google.com; s=arc-20240605; b=WrRof5XPwyQvWAoMsamhWqeH3Gs9MELyCeZZY/W53y0YipJez3llNdwbXns1RSRqGX XG8puLlGKWuk5ioxawrlt9wEfUU4pNrvWU06OHqMFOS88Zs4qg1oWkuf9glc9LuVixhs RwmfqZTIYMrS1JcxFYDjty7LDNsNIcmk5foGgiLl9Vr79CSAlmeziCKjNwhG8RPx0t5w 1esc+WmR4cT3ntGpt0mHjuTBmlHdSvp7bEUa49YuhaLOqGqXwIuqk3PyUdDexu2WY6Uz w9HlHmBu9SDe87y49/A7eSlUVfFFYrTeT5K6ORpewCbm/6yyDsjweTp8Ar7UyeT1IlVa oAIw== 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=tDQ2nrF1cj2VD4EGzweOtCJ8e8jWOBLK4xNmQZewkxg=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=QdOfTJ0ToCPRqk2k2/Sg0luRbO6Y4BiQDrOgx5CCEjiql9vn9Hw04A3sYQhQSve99j H4SEUKp15to0THNkeEM9B7lJ3xUIsLZJPDd4gK2ehQ/popXxmoCg77MtqRcrJjOTB904 ZYphRsDFCBd9Fvu3mt9inu0eJGwmbaKA61F4C8nWgmPW1JfH9uGlVJJPXRNs4qbQJJz3 03Czy3eEnRW2oW+q2Os9FFfi4Aw+aPMttXYYUTBFdZw5/+4TmCSBY9KkgjTK63FM6E4C XSVqH4Hjrgw0j7TvKTvMCdCfdYxLCe8UOrlp+lSmeZ1LXoVv+8aALku7IfmvhSX716s/ IBBg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=SiJF+gZE; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=aNEviP4w; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=M4dZ5nNE; 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 46e09a7af769-752487e5b7esi604489a34.98.2025.09.11.13.12.42 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Sep 2025 13:12:42 -0700 (PDT) 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=SiJF+gZE; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=aNEviP4w; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=M4dZ5nNE; 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=tDQ2nrF1cj2VD4EGzweOtCJ8e8jWOBLK4xNmQZewkxg=; b=SiJF+gZEhgKpR9DA4WM9uQAm2a FuCe5yLdx0bQZkFyKCzY1gCjkRCqUSXZGkkpIyyXHnD9qYal0q9EFC6iiAzgeXeef9Oq7y/puaoyW rpLXZ+BBDrGn5IdlsjDBpeECm8j2Ei9b65whxLW2Cmh4ieh5/A9i+KfzUuZGwLS6bu/M=; 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.95) (envelope-from ) id 1uwnen-00055u-RA; Thu, 11 Sep 2025 20:12:37 +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.95) (envelope-from ) id 1uwnel-00055i-VW for openvpn-devel@lists.sourceforge.net; Thu, 11 Sep 2025 20:12:35 +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=XfhRf6cQ5EfcF+h9EOm4wygXTKVGr3hzBEOPaP6aVpI=; b=aNEviP4wr3qVjNcjhIrcsB9adB N0Rs7jHyHP7r/DWIiwZL8DfvaspZe2paekW/7tJYwJNh6mNarTq82ufrhqWB7I9Gj8mBWCORjxcFI ZqHW3kcrzE2GqOb6uNecxVR01LVZcGTt5oKubvL36J146gmjt+/K+W7aaHLQjitO/Lv8=; 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=XfhRf6cQ5EfcF+h9EOm4wygXTKVGr3hzBEOPaP6aVpI=; b=M4dZ5nNE9Ibeur80wPZ2nFtGBk rejyBSl6VSSkH/2sJoLIXPtSfBGI5dX99BS3h0WZuLxZUBomJv2N2/9qoGlHohfDkarF3war7KO4E bkDEXFzD+rsBPwZo9YBEMpxbJ7MShNZqwcW/k+Jgrth9C8KnmgloXcu1FTmYSzoAdWeY=; 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 1uwnek-0003Ao-RT for openvpn-devel@lists.sourceforge.net; Thu, 11 Sep 2025 20:12:35 +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 58BKCM6H025399 for ; Thu, 11 Sep 2025 22:12:22 +0200 Received: (from gert@localhost) by blue.greenie.muc.de (8.18.1/8.18.1/Submit) id 58BKCM1V025398 for openvpn-devel@lists.sourceforge.net; Thu, 11 Sep 2025 22:12:22 +0200 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Thu, 11 Sep 2025 22:12:16 +0200 Message-ID: <20250911201222.25382-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-1.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: From: Antonio Quartulli Our code generally expects functions that deal with a multi instance to set up a log prefix at the beginning with set_prefix(mi) and clear it at the end with clear_prefix(). 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: 1uwnek-0003Ao-RT Subject: [Openvpn-devel] [PATCH v3] dco: add standard mi prefix handling to multi_process_incoming_dco() 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?1842999787157467183?= X-GMAIL-MSGID: =?utf-8?q?1842999787157467183?= From: Antonio Quartulli Our code generally expects functions that deal with a multi instance to set up a log prefix at the beginning with set_prefix(mi) and clear it at the end with clear_prefix(). Add the calls to multi_process_incoming_dco() in a similar way to what is done for multi_process_incoming_link() - handling "link events" and "dco events" the same, with correct prefix in the function and no leftover prefix afterwards. Github: closes OpenVPN/openvpn#799 Change-Id: I1ad5df0f6785ffe9becd9f83329a9335d1a36f24 Signed-off-by: Antonio Quartulli Signed-off-by: Gert Doering Acked-by: Gert Doering --- 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/+/1116 This mail reflects revision 3 of this Change. Acked-by according to Gerrit (reflected above): Gert Doering diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c index 85975ff..40c7f8f 100644 --- a/src/openvpn/multi.c +++ b/src/openvpn/multi.c @@ -3294,6 +3294,7 @@ if ((peer_id < m->max_clients) && (m->instances[peer_id])) { mi = m->instances[peer_id]; + set_prefix(mi); if (dco->dco_message_type == OVPN_CMD_DEL_PEER) { process_incoming_del_peer(m, mi, dco); @@ -3311,6 +3312,7 @@ { tls_session_soft_reset(mi->context.c2.tls_multi); } + clear_prefix(); } else {