]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Do not set ipv6 address if '--ip-win32 manual' is used
authorSelva Nair <selva.nair@gmail.com>
Sun, 20 Nov 2016 21:18:54 +0000 (16:18 -0500)
committerGert Doering <gert@greenie.muc.de>
Mon, 21 Nov 2016 16:07:52 +0000 (17:07 +0100)
This also applies to --ifconfig-noexec.

Resolves Trac #723

Signed-off-by: Selva Nair <selva.nair@gmail.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <1479676734-21630-1-git-send-email-selva.nair@gmail.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg13143.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/tun.c

index 77ae72fa804ed8df014a275b6f23d053c27e9679..36e0b15be10abb041f6583121a7150c8b17bfa97 100644 (file)
@@ -1372,7 +1372,13 @@ do_ifconfig (struct tuntap *tt,
 
     if ( do_ipv6 )
       {
-       if (tt->options.msg_channel)
+       if (tt->options.ip_win32_type == IPW32_SET_MANUAL)
+         {
+           msg (M_INFO, "******** NOTE:  Please manually set the v6 IP of '%s' to %s (if it is not already set)",
+                actual,
+                ifconfig_ipv6_local);
+          }
+       else if (tt->options.msg_channel)
          {
            do_address_service (true, AF_INET6, tt);
          }
@@ -1391,7 +1397,10 @@ do_ifconfig (struct tuntap *tt,
          }
 
        /* explicit route needed */
-       add_route_connected_v6_net(tt, es);
+       if (tt->options.ip_win32_type != IPW32_SET_MANUAL)
+         {
+           add_route_connected_v6_net(tt, es);
+         }
       }
 #else
       msg (M_FATAL, "Sorry, but I don't know how to do 'ifconfig' commands on this operating system.  You should ifconfig your TUN/TAP device manually or use an --up script.");