Attention is currently required from: flichtenheld, ordex, plaisthos.
Hello flichtenheld, ordex, plaisthos,
I'd like you to reexamine a change. Please visit
http://gerrit.openvpn.net/c/openvpn/+/761?usp=email
to look at the new patch set (#5).
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
If we want to use a wildcard IPv6 socket (i.e ::port), it
must be separate from an IPv4 wildcard socket.
To do this, we need to set a specific flag when passing
'::' to '--local' otherwise the second socket won't be
able to bind properly.
Change-Id: I705fd9bf9298a54560eca12e3797351f4af321a7
Signed-off-by: Antonio Quartulli <[email protected]>
Signed-off-by: Gianmarco De Gregori <[email protected]>
---
M src/openvpn/socket.c
1 file changed, 10 insertions(+), 2 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/61/761/5
diff --git a/src/openvpn/socket.c b/src/openvpn/socket.c
index b7d80ee..2b55021 100644
--- a/src/openvpn/socket.c
+++ b/src/openvpn/socket.c
@@ -1111,9 +1111,17 @@
}
else
{
+ bool v6only = sock->info.bind_ipv6_only;
+
+ /* force binding IPv6-only if an address was specified
+ * and 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/+/761?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: I705fd9bf9298a54560eca12e3797351f4af321a7
Gerrit-Change-Number: 761
Gerrit-PatchSet: 5
Gerrit-Owner: its_Giaan <[email protected]>
Gerrit-Reviewer: flichtenheld <[email protected]>
Gerrit-Reviewer: ordex <[email protected]>
Gerrit-Reviewer: plaisthos <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]>
Gerrit-Attention: flichtenheld <[email protected]>
Gerrit-Attention: ordex <[email protected]>
Gerrit-MessageType: newpatchset
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel