From: "mrbff (Code Review)" Date: Fri, 17 Jan 2025 10:57:03 +0000 In-Reply-To: References: Reply-To: marco@...2726..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641..., gert@...1296... Message-ID: <52a4eb376d6ff84ac8ae40d19f3095b278d1ea3e-EmailReplacePatchSet-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="wcW90KQJ2KU="; charset=UTF-8 Subject: [Openvpn-devel] [S] Change in openvpn[master]: IPv6 MADDR LOG: Wrap IPv6 addresses in square brackets and print port... List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos , flichtenheld Cc: cron2 , openvpn-devel --wcW90KQJ2KU= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: flichtenheld, mrbff, plaisthos. Hello flichtenheld, plaisthos, I'd like you to reexamine a change. Please visit http://gerrit.openvpn.net/c/openvpn/+/870?usp=3Demail to look at the new patch set (#2). Change subject: IPv6 MADDR LOG: Wrap IPv6 addresses in square brackets and = print port when the port is specified ...................................................................... IPv6 MADDR LOG: Wrap IPv6 addresses in square brackets and print port when = the port is specified Updated the mroute_addr_print_ex() function to wrap IPv6 addresses in squ= are brackets and printing the port when the port is specified, e.g., [2001:db= 8::1]:8080 . When the port is not specified the IPv6 address formatting remain the sam= e, e.g., 2001:db8::1 . Change-Id: Ia58cff107d14e29e51df0a988e8337cbb70ebfbb Signed-off-by: Marco Baffo --- M src/openvpn/mroute.c 1 file changed, 8 insertions(+), 7 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/70/870/2 diff --git a/src/openvpn/mroute.c b/src/openvpn/mroute.c index f4539dc..80e18b7 100644 --- a/src/openvpn/mroute.c +++ b/src/openvpn/mroute.c @@ -430,18 +430,19 @@ { buf_printf(&out, "%s", print_in_addr_t(maddr.v4mappedv= 6.addr, IA_NET_ORDER, g= c)); - /* 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 if (maddr.type & MR_WITH_PORT) + { + buf_printf(&out, "[%s]", print_in6_addr(maddr.v6.addr,= 0, gc)); } else { 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) { buf_printf(&out, "/%d", maddr.netbits); -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/870?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Ia58cff107d14e29e51df0a988e8337cbb70ebfbb Gerrit-Change-Number: 870 Gerrit-PatchSet: 2 Gerrit-Owner: mrbff Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: cron2 Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-Attention: flichtenheld Gerrit-Attention: mrbff Gerrit-MessageType: newpatchset --wcW90KQJ2KU= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is currently required from: flichtenheld, mrbff, plaisthos. <= /p>

mrbff uploaded patch set #2 to this change.

View Change

git pull ssh:=
//gerrit.openvpn.net:29418/openvpn refs/changes/70/870/2
diff --git=
 a/src/openvpn/mroute.c b/src/openvpn/mroute.c
index f4539d= c..80e18b7 100644
--- a/src/openvpn/mroute.c
+++ b/src/openvpn/mroute.c
@@ -430,18 +430,19 @@ {
buf_printf(= &out, "%s", print_in_addr_t(maddr.v4mappedv6.addr,
= IA_NET_OR= DER, gc));
- = /* we only print port numbers for v4mapped v6 as of
- * today, becaus= e "v6addr:port" is too ambiguous
- */
- if (maddr.type & MR_WITH_POR= T)
- = {
- = buf_printf(&out, ":%d", ntohs(maddr.v6.port));- }+ }
<= span style=3D"color: hsl(120, 100%, 40%);">+ else if (maddr.= type & MR_WITH_PORT)
+ {
+ if (maddr.type & M= R_WITH_PORT)
+ = {
+ = buf_printf(&out, ":%d", ntohs(maddr.v6.port));
+ }
if (maddr.type & MR_WITH_NETBITS) {
buf_printf(&= amp;out, "/%d", maddr.netbits);

=

To view, visit change 870. To unsubscribe, or for help writing mail filters,= visit settings.

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ia58cff107d14e29e51df0a988e8= 337cbb70ebfbb
Gerrit-Change-Number: 870
Gerrit-PatchSet: 2
Gerrit-Owner: mrbff <marco@...2726...> <= /div>
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: cron2 <gert@...1296...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
Gerrit-Attention: flichtenheld <frank@...2375...= 41...>
Gerrit-Attention: mrbff <marco@...2726...&g= t;
Gerrit-MessageType: newpatchset
--wcW90KQJ2KU=--