]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Fix proto tcp6 for server & non-P2MP modes
authorJosh Cepek <josh.cepek@usa.net>
Thu, 2 May 2013 21:17:37 +0000 (16:17 -0500)
committerGert Doering <gert@greenie.muc.de>
Fri, 3 May 2013 15:06:56 +0000 (17:06 +0200)
This fix adds support for using tcp6 as a proto in server or non-P2MP
modes, resolving a failed ASSERT in such cases.

Fixes the crash in trac#288.

Signed-off-by: Josh Cepek <josh.cepek@usa.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <klul5d$8ta$1@ger.gmane.org>
URL: http://article.gmane.org/gmane.network.openvpn.devel/7578
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/options.c

index a8712c81c959a5f498e61b4f4bc406971b1bc3cd..c5ed0d6e3b94d638458368874496cf521f2c00bc 100644 (file)
@@ -1835,6 +1835,8 @@ options_postprocess_verify_ce (const struct options *options, const struct conne
    */
   if (ce->proto == PROTO_TCPv4)
     msg (M_USAGE, "--proto tcp is ambiguous in this context.  Please specify --proto tcp-server or --proto tcp-client");
+  if (ce->proto == PROTO_TCPv6)
+    msg (M_USAGE, "--proto tcp6 is ambiguous in this context.  Please specify --proto tcp6-server or --proto tcp6-client");
 
   /*
    * Sanity check on daemon/inetd modes
@@ -2357,6 +2359,8 @@ options_postprocess_mutate_ce (struct options *o, struct connection_entry *ce)
     {
       if (ce->proto == PROTO_TCPv4)
        ce->proto = PROTO_TCPv4_SERVER;
+      else if (ce->proto == PROTO_TCPv6)
+       ce->proto = PROTO_TCPv6_SERVER;
     }
 #endif
 #if P2MP