From patchwork Thu Jan 16 17:11:40 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "mrbff (Code Review)" X-Patchwork-Id: 4065 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:b7cb:b0:5e7:b9eb:58e8 with SMTP id en11csp263949mab; Thu, 16 Jan 2025 09:12:04 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUO3cdQdovb5EsNs5dL5zl30kIrvd2Aw7oQ+r+CgTh2tTvEGN1A3Wf8Yuo2xtiG2XWIHuLgRh1ia4o=@openvpn.net X-Google-Smtp-Source: AGHT+IE1TYHa0YAKKzspzzsOPli3PGtk1WmGwHZ92ZIbwBdm4hJGpa3CB+RvgzdzdnZGBoOYNv+X X-Received: by 2002:a05:6830:7301:b0:71d:54cd:5289 with SMTP id 46e09a7af769-721e2ecda6bmr27746186a34.21.1737047524188; Thu, 16 Jan 2025 09:12:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737047524; cv=none; d=google.com; s=arc-20240605; b=PQZrXvlRMNNi+mZjKRrnW5WYaZ/Pf6MTp8ANsDGATCFcRck3CpyTtdgagWHt+5aXIU Bu3mV4FeeGQNze8iqtCArBBV7VttOVmz0plwwViixHcSJ71HRMVvsCOkxHXYnDoJxj/f RgvDLXBgLRaGOn9lpp9x7MObyP6FxOLmM8H3d7vkq0oCJGk1mkX3oqxWOhnErV4oypx4 UV6VO60J/PUz4kbq12OFyY5nhcDzXFL+eAhLxGmRm+VFfe+yWL62tbNvFbdoPGtzDv9e et2EjCYycKairBSXaweWJQL4XsYMrFxNof44jyZATARbpWzl2pkFxq4UA/Wm+E3uJIMJ sLXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:cc:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject:user-agent :mime-version:message-id:references:auto-submitted:to:date:from :dkim-signature:dkim-signature:dkim-signature; bh=WA2upCcWcL3KCMmDoFgT0wt6mshCP9DyYm69Vn6trjc=; fh=U7wEyxtwz2o5+UdevFSA47vNeG9knhWH0KV//QhD5a0=; b=jHsQqW5GtLL2E532JoGrQtKmeH/nNOnfmJZF30fV8oA/OZQ43OLYb/e6moI4bzKT/+ XsFfwibwN5JuyxT1FTpdChYyXTTB4e5Vl/9+3DxychUbssNuV9y9Qtst10swuNgrOGik g5hqaK7knP27ZYsjUDsE83Sr3bBrt/0ex7hKYgqMFUhKeT1Ag7+iBYmBHacU3EddTuOe FAkPbIcHKbNHQ+ZoHQH8LysngWrjx31GpEzGkkTqIELVrCCoMFFOR4Ev+QTpSa2aKyyl h21jret7JGyjm6dtc3WZnfoAWxNPJBWLdxqE91NTGPppFWZHKYqxbj/zng/aHzZYNEUY Ah1w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=Hpq9opPt; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=QALLX5Fk; dkim=neutral (body hash did not verify) header.i=@openvpn.net header.s=google header.b=Y35KvCb4; 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=openvpn.net; dara=fail header.i=@openvpn.net Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id 46e09a7af769-7249b392b21si445309a34.8.2025.01.16.09.12.03 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Jan 2025 09:12:04 -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=Hpq9opPt; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=QALLX5Fk; dkim=neutral (body hash did not verify) header.i=@openvpn.net header.s=google header.b=Y35KvCb4; 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=openvpn.net; dara=fail header.i=@openvpn.net Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1tYTPP-0007lq-BP; Thu, 16 Jan 2025 17:11:56 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1tYTPN-0007lj-Jz for openvpn-devel@lists.sourceforge.net; Thu, 16 Jan 2025 17:11:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Type:Content-Transfer-Encoding:MIME-Version :Message-ID:Reply-To:References:Subject:List-Unsubscribe:List-Id:Cc:To:Date: From:Sender:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:List-Help: List-Subscribe:List-Post:List-Owner:List-Archive; bh=N0/m26q/T32aPaESoloyj4fmHfYejXGNnOotrGIRt9A=; b=Hpq9opPtfQ550gEqijDcMqspnF 80+N66mfaagWUA+gkgczvqzjVUjWZ/8afmK90DYgYK84FXyLPoOTexeY+S9aMrmfg/o2he5vzQzaf FB9yJWyBGJNhBhjwOE9rza8SZ/aU9/AVs0cWutrlRknrWpT+6uZlwvnPKIGhPOK6Mxcg=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Type:Content-Transfer-Encoding:MIME-Version:Message-ID:Reply-To: References:Subject:List-Unsubscribe:List-Id:Cc:To:Date:From:Sender:Content-ID :Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To: Resent-Cc:Resent-Message-ID:In-Reply-To:List-Help:List-Subscribe:List-Post: List-Owner:List-Archive; bh=N0/m26q/T32aPaESoloyj4fmHfYejXGNnOotrGIRt9A=; b=Q ALLX5Fk1PO1FgYtw42H0Py6T9r1DxFo86z+vJJt5jOGHp90uti8xyzzlTL767kn3ZuaHWMd7rUeQX EzvxmZGcfqAnmAweDsoZKDR+/Vimo8k9HSIeiS6KnUpIiIQ5WLZtp29e2vWKlveYPL3Sbj0ktSj65 U2MFtlGeRw1fatTw=; Received: from mail-wm1-f49.google.com ([209.85.128.49]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.95) id 1tYTPN-0006zs-CG for openvpn-devel@lists.sourceforge.net; Thu, 16 Jan 2025 17:11:54 +0000 Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-4362bae4d7dso7964465e9.1 for ; Thu, 16 Jan 2025 09:11:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvpn.net; s=google; t=1737047501; x=1737652301; darn=lists.sourceforge.net; h=user-agent:content-disposition:content-transfer-encoding :mime-version:message-id:reply-to:references:subject :list-unsubscribe:list-id:auto-submitted:cc:to:date:from:from:to:cc :subject:date:message-id:reply-to; bh=N0/m26q/T32aPaESoloyj4fmHfYejXGNnOotrGIRt9A=; b=Y35KvCb44R868jXSGsLdpSHZjj/SrcSNfZSs8YriUBuqDB+7EkXgB4x6T5kNKpWTpr ASldpXIMs7PXocCjq7oKhU09J15GdH8IN+ZYIKBZY6hwjCqQ7A67d6fTKxwnuQNPrKBB 1B8UFpHKn3WwxjPi3rTWTztvw+IgzMwVPmUJbtWw0HlNrYxbxA/klVLOaUzgpogmQYqk YJnu/lUCLKodyLH+m2/gWs2VYdpgUWJBkO2N32cT4KFZWctFeMWI2+UjXbj4w9S5CZ3U O4Cdyshpc9WVm7RPgAJ6f85yDYV82WJQR50GD+Fr0RIkOMezaTo2Zh9oEh9rLBC+T8xu N2UA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737047501; x=1737652301; h=user-agent:content-disposition:content-transfer-encoding :mime-version:message-id:reply-to:references:subject :list-unsubscribe:list-id:auto-submitted:cc:to:date:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=N0/m26q/T32aPaESoloyj4fmHfYejXGNnOotrGIRt9A=; b=FZE8TZE6sQE0bza1Dp31EXVOHjQQJfQWQgi3sbtmmrLrdmL1zRrMThXgA5CBrmHaII +szDd38a9Qju6Fc0MxXhUlQunFX1Lb6qtEn+k+3yJNj4GipFvDZCBy/rBazM44aZGmm1 FI3HZLgdRZzv7Vfb5UgN8O1mTvqkH9osfJnhHEoRP79nyuvaxbQy/08IqOn4sFAotLfj 15IW+l/gdKiOM0rzZomRdjHFkYPIj7/3YdrjkZM5Eq4dR/ToBtFtIGrP1uNy2E5P+1LJ hwlTzaT8qvSw1NIKpjPldl5h534wbovikRIhJ4+sYolNypCD2bOeRd7wqkMEX69ESSw2 XrXA== X-Gm-Message-State: AOJu0YwPDRZjDaHm8wqX0/7F+CGoKEgGUHYesdCZH4raBd4SKKd3QrpE DC/EMm5qNEwR80u+keiiSD30r5ALImK3nJF0wwCxcPegEVgDLvwn4tpmv2/icko= X-Gm-Gg: ASbGncsUM+2U8B+PP39/65fQj+TiXTptLv6Mw7FHOfbc4w9H25+rCYhFjaHNHXPDPFX sn7dzIZp06rG8kv4Zg8sXlnlh6ZwUOW3/W5idK5pOAJqUw+Ryaeuefw00GgNOossAGm+4bdt5V+ bdpRWl9ArotwB7ZUdAJk01AVenxSyBpBW97gpCjCc9ZRRZZZEALzfcbdng3p7f5srKdRw9/bzMB On9V8uaAs7FDsPI74FGwAC01BcEAWvcaSxEDy9T9W9/F3jfEfTrAsubEcEf70F2V3C04tmhDJON 7fMkguUH2ostf0bGdvoK7lbLMHQnxWUu1KHdcf7EBqFsmM1X X-Received: by 2002:a05:600c:4f47:b0:434:e8cf:6390 with SMTP id 5b1f17b1804b1-436e2684dfcmr282155395e9.6.1737047501501; Thu, 16 Jan 2025 09:11:41 -0800 (PST) Received: from gerrit.openvpn.in (ec2-18-159-0-78.eu-central-1.compute.amazonaws.com. [18.159.0.78]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4388ebdefe0sm21131825e9.15.2025.01.16.09.11.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jan 2025 09:11:40 -0800 (PST) From: "mrbff (Code Review)" X-Google-Original-From: "mrbff (Code Review)" X-Gerrit-PatchSet: 1 Date: Thu, 16 Jan 2025 17:11:40 +0000 To: plaisthos , flichtenheld Auto-Submitted: auto-generated X-Gerrit-MessageType: newchange X-Gerrit-Change-Id: Ia58cff107d14e29e51df0a988e8337cbb70ebfbb X-Gerrit-Change-Number: 870 X-Gerrit-Project: openvpn X-Gerrit-ChangeURL: X-Gerrit-Commit: f715c200d2c444bfbdd610db9bbaee96c8625725 References: Message-ID: <2ad97b27f1fcdee2b4cd87d14bf41e7aa1dd2a53-HTML@gerrit.openvpn.net> MIME-Version: 1.0 User-Agent: Gerrit/3.8.2 X-Spam-Score: -2.0 (--) 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: Attention is currently required from: flichtenheld, plaisthos. Hello plaisthos, flichtenheld, I'd like you to do a code review. Please visit Content analysis details: (-2.0 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.128.49 listed in list.dnswl.org] 0.0 RCVD_IN_VALIDITY_SAFE_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [209.85.128.49 listed in sa-trusted.bondedsender.org] 0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [209.85.128.49 listed in bl.score.senderscore.com] -1.8 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.128.49 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 WEIRD_PORT URI: Uses non-standard port number for HTTP 0.0 HTML_MESSAGE BODY: HTML included in message -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.0 T_KAM_HTML_FONT_INVALID Test for Invalidly Named or Formatted Colors in HTML X-Headers-End: 1tYTPN-0006zs-CG Subject: [Openvpn-devel] [S] Change in openvpn[master]: IPv6 MADDR LOG: Wrap IPv6 addresses in square brackets and include po... 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: , Reply-To: marco@mandelbit.com, arne-openvpn@rfc2549.org, openvpn-devel@lists.sourceforge.net, frank@lichtenheld.com Cc: openvpn-devel Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1821426344384690530?= X-GMAIL-MSGID: =?utf-8?q?1821426344384690530?= X-getmail-filter-classifier: gerrit message type newchange Attention is currently required from: flichtenheld, plaisthos. Hello plaisthos, flichtenheld, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/870?usp=email to review the following change. Change subject: IPv6 MADDR LOG: Wrap IPv6 addresses in square brackets and include port when specified ...................................................................... IPv6 MADDR LOG: Wrap IPv6 addresses in square brackets and include port when specified - Updated the mroute_addr_print_ex() function to always wrap IPv6 addresses in square brackets for proper formatting. - Added port printing for IPv6 addresses when specified, e.g., [2001:db8::1]:8080. Change-Id: Ia58cff107d14e29e51df0a988e8337cbb70ebfbb Signed-off-by: Marco Baffo --- M src/openvpn/mroute.c 1 file changed, 5 insertions(+), 8 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/70/870/1 diff --git a/src/openvpn/mroute.c b/src/openvpn/mroute.c index f4539dc..91419ed 100644 --- a/src/openvpn/mroute.c +++ b/src/openvpn/mroute.c @@ -430,17 +430,14 @@ { buf_printf(&out, "%s", print_in_addr_t(maddr.v4mappedv6.addr, IA_NET_ORDER, gc)); - /* we only print port numbers for v4mapped v6 as of - * today, because "v6addr:port" is too ambiguous - */ - if (maddr.type & MR_WITH_PORT) - { - buf_printf(&out, ":%d", ntohs(maddr.v6.port)); - } } else { - buf_printf(&out, "%s", print_in6_addr(maddr.v6.addr, 0, gc)); + buf_printf(&out, "[%s]", print_in6_addr(maddr.v6.addr, 0, gc)); + } + if (maddr.type & MR_WITH_PORT) + { + buf_printf(&out, ":%d", ntohs(maddr.v6.port)); } if (maddr.type & MR_WITH_NETBITS) {