Browse code

Do not set ipv6 address if '--ip-win32 manual' is used

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>

Selva Nair authored on 2016/11/21 06:18:54
Showing 1 changed files
... ...
@@ -1372,7 +1372,13 @@ do_ifconfig (struct tuntap *tt,
1372 1372
 
1373 1373
     if ( do_ipv6 )
1374 1374
       {
1375
-	if (tt->options.msg_channel)
1375
+	if (tt->options.ip_win32_type == IPW32_SET_MANUAL)
1376
+	  {
1377
+	    msg (M_INFO, "******** NOTE:  Please manually set the v6 IP of '%s' to %s (if it is not already set)",
1378
+	         actual,
1379
+	         ifconfig_ipv6_local);
1380
+          }
1381
+	else if (tt->options.msg_channel)
1376 1382
 	  {
1377 1383
 	    do_address_service (true, AF_INET6, tt);
1378 1384
 	  }
... ...
@@ -1391,7 +1397,10 @@ do_ifconfig (struct tuntap *tt,
1391 1391
 	  }
1392 1392
 
1393 1393
 	/* explicit route needed */
1394
-	add_route_connected_v6_net(tt, es);
1394
+	if (tt->options.ip_win32_type != IPW32_SET_MANUAL)
1395
+	  {
1396
+	    add_route_connected_v6_net(tt, es);
1397
+	  }
1395 1398
       }
1396 1399
 #else
1397 1400
       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.");