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/+/435?usp=email
to review the following change.
Change subject: if a local IPv6 address is provided, socket must be v6-only
......................................................................
if a local IPv6 address is provided, socket must be v6-only
Change-Id: I7a3349c7de4202b5eb2f576e3f8a82a9af6f7f31
Signed-off-by: Antonio Quartulli <[email protected]>
---
M src/openvpn/socket.c
1 file changed, 8 insertions(+), 2 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/35/435/1
diff --git a/src/openvpn/socket.c b/src/openvpn/socket.c
index f2bd624..17bd263 100644
--- a/src/openvpn/socket.c
+++ b/src/openvpn/socket.c
@@ -1108,9 +1108,15 @@
}
else
{
+ bool v6only = sock->info.bind_ipv6_only;
+
+ /* force binding IPv6-only if an address was specified
+ * an it is a IPv6 */
+ if (sock->local_host && ai_family == AF_INET6)
+ v6only = true;
+
socket_bind(sock->sd, sock->info.lsa->bind_local,
- ai_family,
- "TCP/UDP", sock->info.bind_ipv6_only);
+ ai_family, "TCP/UDP", v6only);
}
}
}
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/435?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: I7a3349c7de4202b5eb2f576e3f8a82a9af6f7f31
Gerrit-Change-Number: 435
Gerrit-PatchSet: 1
Gerrit-Owner: ordex <[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