]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Delete the IPv6 route to the "connected" network on tun close
authorSelva Nair <selva.nair@gmail.com>
Thu, 1 Mar 2018 20:34:44 +0000 (15:34 -0500)
committerGert Doering <gert@greenie.muc.de>
Fri, 2 Mar 2018 07:17:31 +0000 (08:17 +0100)
This was missing on Windows when interactive service is in use.

v3: Mar 1, 2017: avoid code repetition and rebase to master

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

index 9f3b98d12376eeacbbdcad51e89fbff3ca1e5b74..263cacdf080422491fa00cc241e1f4e1477872d3 100644 (file)
@@ -6185,6 +6185,9 @@ close_tun(struct tuntap *tt)
     {
         if (tt->did_ifconfig_ipv6_setup)
         {
+            /* remove route pointing to interface */
+            delete_route_connected_v6_net(tt, NULL);
+
             if (tt->options.msg_channel)
             {
                 do_address_service(false, AF_INET6, tt);
@@ -6198,9 +6201,6 @@ close_tun(struct tuntap *tt)
                 const char *ifconfig_ipv6_local;
                 struct argv argv = argv_new();
 
-                /* remove route pointing to interface */
-                delete_route_connected_v6_net(tt, NULL);
-
                 /* "store=active" is needed in Windows 8(.1) to delete the
                  * address we added (pointed out by Cedric Tabary).
                  */