From: Selva Nair Date: Thu, 24 Nov 2016 16:19:23 -0500 Message-Id: <1480022363-24222-1-git-send-email-selva.nair@...277...> Subject: [Openvpn-devel] [PATCH] Delete the IPv6 route to the "connected" network on tun close List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: openvpn-devel@lists.sourceforge.net This was missing on Windows when interactive service is in use. - Added route_ipv6_clear_host_bits(r6) to delete_route_ipv6: this is required for Windows IP-helper API. Won't hurt other platforms (?) Signed-off-by: Selva Nair --- src/openvpn/route.c | 2 ++ src/openvpn/tun.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/openvpn/route.c b/src/openvpn/route.c index fec12c1..85f969e 100644 --- a/src/openvpn/route.c +++ b/src/openvpn/route.c @@ -2124,6 +2124,8 @@ delete_route_ipv6 (const struct route_ipv6 *r6, const struct tuntap *tt, unsigne gc_init (&gc); + route_ipv6_clear_host_bits (r6); + network = print_in6_addr( r6->network, 0, &gc); gateway = print_in6_addr( r6->gateway, 0, &gc); diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c index 560b1a8..40ce202 100644 --- a/src/openvpn/tun.c +++ b/src/openvpn/tun.c @@ -5663,6 +5663,9 @@ close_tun (struct tuntap *tt) { if (tt->options.msg_channel) { + /* remove route pointing to interface */ + delete_route_connected_v6_net(tt, NULL); + do_address_service (false, AF_INET6, tt); if (tt->options.dns6_len > 0) do_dns6_service (false, tt); -- 2.1.4