From patchwork Tue Dec 27 02:24:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arne Schwabe X-Patchwork-Id: 2945 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7300:c95:b0:82:e4b3:40a0 with SMTP id p21csp2355355dyk; Mon, 26 Dec 2022 18:24:52 -0800 (PST) X-Google-Smtp-Source: AMrXdXvqGTz/AivivOeY6n0r3VT7yEpHrhAoxhyKenHjD/nbSY244vwLQgSKh1CYNm2K4q8WG8fs X-Received: by 2002:a05:6a00:1255:b0:576:b8e1:862b with SMTP id u21-20020a056a00125500b00576b8e1862bmr26589447pfi.14.1672107891999; Mon, 26 Dec 2022 18:24:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672107891; cv=none; d=google.com; s=arc-20160816; b=OogkQqI7lY7pyslW0he4D7jI8WN94l8ad2aa0QLo9QusIdnq4k+ySGwBkQ3zW1PDqv 657R9bQjviSukVXeGpkmVXHlSlXT3eAhpsBEoW9ujEwOL0L3YKQkNQS1Oyl3Moiaxx8Y s7XTJyJLtIivCmYIBImXaBgZ9LCyc67fPma+7rHax0oUnnWf0C2LlxIlX6DRTbx3chQe H6vCGj6g8/K7JRi0MxaXRdDaoZjF92542+JlSM8AUqN03ZBrW5aHdLqbx0jUPbXLnSeA clNkN1Aj2aYtmZBmg9izGBg1edczZUoB8MrI75sZWt6HCx6DpgyXeBBBlrOMLqMt4MZA +IYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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; bh=xdgg0K2ljkRnGu70qTnduUVKqWf7rICVOoLDHJBMHQw=; b=0KvWGZQKbYlUGiX8/Bb4dDDltx8g1ctKkEfmTH6O+fBv1zCY8xNOAWcXHH3NTK3oi4 24vFvGX/3etin7xH1CtL/iS8bRRt7zKHtnRVYR5Q+rFQFSPWhBvxSyYNsBmTUyi3sKVu KuEFkFcR9bFSN4cFnE6imkgM4greDaNlSVeDRi8sboFQe+XnY8EESBCgOsJ20nLnkVCQ XnBVZbsdSHc7qUwbNREosW0sqg2B6x5da8GBlXbSEM9zrwuW9TKTtRHtr3cwYMqjDmmT t2aTbAir3u6IEyfoSCVcVL0UrlnfzFgVSMMOLlLWTiGX/5IUM92hHXKnBPJe5A9/f+CR uvKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=I1SH1THy; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b="NfnEaKu/"; 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 Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id q15-20020a056a00150f00b0054252c63d75si11763623pfu.98.2022.12.26.18.24.51 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Dec 2022 18:24:51 -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=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=I1SH1THy; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b="NfnEaKu/"; 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 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 1p9zdj-0005qY-0l; Tue, 27 Dec 2022 02:24:27 +0000 Received: from [172.30.20.202] (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 1p9zdX-0005qM-Lc for openvpn-devel@lists.sourceforge.net; Tue, 27 Dec 2022 02:24:16 +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=hyxCxazwdCYX2DHq09F0tFh/rOvhE6tIv1pWUbyKNKE=; b=I1SH1THywP+1zAj2YDdl9HTb3k 8b9dWJxKjJMwPGz6o9y1lDIBmEE+JlBLGdBayhCp31kYqsOnBMI4UKepvzSf4rktJX6Y126HHEYst VVA2jk2cU8lUP7VKK/ASGtU+fOnwjGlcIDvIVIhlWx39gNG05p5/T4nAJyJ63u2cknt4=; 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=hyxCxazwdCYX2DHq09F0tFh/rOvhE6tIv1pWUbyKNKE=; b=NfnEaKu/1xd+No3BPGDKoy9xu4 WOBqofmV0NewjmnGjV1QBzG84QzBJcoWDeFXwQdYPvm2EVwvQRDNdX6Nw6a3E//0rLSepJJ5auwPO 5NWwsKOQ3QSv5s2aI0yH2ssCpTGNr7BZH7A0E9BK7LUgyrCE9bAWIRzO3fUTQnync8t4=; Received: from mail.blinkt.de ([192.26.174.232]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1p9zdT-00DihK-D0 for openvpn-devel@lists.sourceforge.net; Tue, 27 Dec 2022 02:24:15 +0000 Received: from kamera.blinkt.de ([2001:638:502:390:20c:29ff:fec8:535c]) by mail.blinkt.de with smtp (Exim 4.95 (FreeBSD)) (envelope-from ) id 1p9zdM-0002IY-3I for openvpn-devel@lists.sourceforge.net; Tue, 27 Dec 2022 03:24:04 +0100 Received: (nullmailer pid 3468191 invoked by uid 10006); Tue, 27 Dec 2022 02:24:04 -0000 From: Arne Schwabe To: openvpn-devel@lists.sourceforge.net Date: Tue, 27 Dec 2022 03:24:04 +0100 Message-Id: <20221227022404.3468137-4-arne@rfc2549.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221227022404.3468137-1-arne@rfc2549.org> References: <20221227022404.3468137-1-arne@rfc2549.org> MIME-Version: 1.0 X-Spam-Score: 0.3 (/) X-Spam-Report: Spam detection software, running on the system "util-spamd-1.v13.lw.sourceforge.com", 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: This enables logging the peer id in p2mp mode if dco is enabled and the log level is high enough Signed-off-by: Arne Schwabe --- src/openvpn/multi.c | 6 ++++++ 1 file changed, 6 insertions(+) Content analysis details: (0.3 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_NONE SPF: sender does not publish an SPF Record X-Headers-End: 1p9zdT-00DihK-D0 Subject: [Openvpn-devel] [PATCH v2 4/4] Log peer-id if loglevel is D_DCO_DEBUG and dco is enabled 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?1753332204756481170?= X-GMAIL-MSGID: =?utf-8?q?1753332204756481170?= This enables logging the peer id in p2mp mode if dco is enabled and the log level is high enough Signed-off-by: Arne Schwabe --- src/openvpn/multi.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c index 50d88f19a..f8366be28 100644 --- a/src/openvpn/multi.c +++ b/src/openvpn/multi.c @@ -473,6 +473,12 @@ multi_instance_string(const struct multi_instance *mi, bool null, struct gc_aren buf_printf(&out, "%s/", cn); } buf_printf(&out, "%s", mroute_addr_print(&mi->real, gc)); + if (mi->context.c2.tls_multi + && mi->context.options.verbosity >= D_DCO_DEBUG + && dco_enabled(&mi->context.options)) + { + buf_printf(&out, " peer-id=%d", mi->context.c2.tls_multi->peer_id); + } return BSTR(&out); } else if (null)