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/options.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/openvpn/options.c') diff --git a/src/openvpn/options.c b/src/openvpn/options.c index 3edab58..e8704fe 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -779,6 +779,7 @@ init_options (struct options *o, const bool init_gc) o->topology = TOP_NET30; o->ce.proto = PROTO_UDP; o->ce.af = AF_UNSPEC; + o->ce.bind_ipv6_only = false; o->ce.connect_retry_seconds = 5; o->ce.connect_timeout = 10; o->connect_retry_max = 0; @@ -4870,6 +4871,9 @@ add_option (struct options *options, { VERIFY_PERMISSION (OPT_P_GENERAL|OPT_P_CONNECTION); options->ce.bind_defined = true; + if (p[1] && streq (p[1], "ipv6only")) + options->ce.bind_ipv6_only=true; + } else if (streq (p[0], "nobind")) { -- cgit