From 8832c6c4cf7d1425684dd8e56984e407fe3e2aac Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Mon, 25 Nov 2013 13:31:18 +0100 Subject: Implement listing on IPv4/IPv6 dual socket on all platform With this patch OpenVPN will listen on Ipv4 as well as IPv6 when an IPv6 socket is used. Using bind ipv6only will disable this behavior Acked-by: Gert Doering Message-Id: <1385382680-5912-7-git-send-email-arne@rfc2549.org> URL: http://article.gmane.org/gmane.network.openvpn.devel/8052 Signed-off-by: Gert Doering --- src/openvpn/socket.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/openvpn/socket.h') diff --git a/src/openvpn/socket.h b/src/openvpn/socket.h index 5c93474..e0e0fff 100644 --- a/src/openvpn/socket.h +++ b/src/openvpn/socket.h @@ -118,6 +118,7 @@ struct link_socket_info bool remote_float; int proto; /* Protocol (PROTO_x defined below) */ sa_family_t af; /* Address family like AF_INET, AF_INET6 or AF_UNSPEC*/ + bool bind_ipv6_only; int mtu_changed; /* Set to true when mtu value is changed */ }; @@ -289,7 +290,8 @@ struct link_socket *link_socket_new (void); void socket_bind (socket_descriptor_t sd, struct addrinfo *local, int af_family, - const char *prefix); + const char *prefix, + bool ipv6only); int openvpn_connect (socket_descriptor_t sd, const struct sockaddr *remote, @@ -308,6 +310,7 @@ link_socket_init_phase1 (struct link_socket *sock, const char *remote_port, int proto, sa_family_t af, + bool bind_ipv6_only, int mode, const struct link_socket *accept_from, #ifdef ENABLE_HTTP_PROXY -- cgit