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 <[email protected]>
---
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)
{
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/870?usp=email
To unsubscribe, or for help writing mail filters, visit
http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ia58cff107d14e29e51df0a988e8337cbb70ebfbb
Gerrit-Change-Number: 870
Gerrit-PatchSet: 1
Gerrit-Owner: mrbff <[email protected]>
Gerrit-Reviewer: flichtenheld <[email protected]>
Gerrit-Reviewer: plaisthos <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]>
Gerrit-Attention: flichtenheld <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel