From patchwork Thu Mar 1 05:09:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Selva Nair X-Patchwork-Id: 257 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director10.mail.ord1d.rsapps.net ([172.30.191.6]) by backend30.mail.ord1d.rsapps.net (Dovecot) with LMTP id U3jSKLExmFqFJAAAIUCqbw for ; Thu, 01 Mar 2018 12:00:33 -0500 Received: from proxy20.mail.ord1d.rsapps.net ([172.30.191.6]) by director10.mail.ord1d.rsapps.net (Dovecot) with LMTP id gYZRCrExmFoZSwAApN4f7A ; Thu, 01 Mar 2018 12:00:33 -0500 Received: from smtp38.gate.ord1d ([172.30.191.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy20.mail.ord1d.rsapps.net with LMTP id MBhYKLExmFpfEgAAsk8m8w ; Thu, 01 Mar 2018 12:00:33 -0500 X-Spam-Threshold: 95 X-Spam-Score: 0 X-Spam-Flag: NO X-Virus-Scanned: OK X-Orig-To: openvpnslackdevel@openvpn.net X-Originating-Ip: [216.105.38.7] Authentication-Results: smtp38.gate.ord1d.rsapps.net; iprev=pass policy.iprev="216.105.38.7"; spf=pass smtp.mailfrom="openvpn-devel-bounces@lists.sourceforge.net" smtp.helo="lists.sourceforge.net"; dkim=fail (signature verification failed) header.d=sourceforge.net; dkim=fail (signature verification failed) header.d=sf.net; dkim=fail (signature verification failed) header.d=gmail.com; dmarc=fail (p=none; dis=none) header.from=gmail.com X-Classification-ID: 0d5ebbc8-1d72-11e8-886f-525400f6a58b-1-1 Received: from [216.105.38.7] ([216.105.38.7:6131] helo=lists.sourceforge.net) by smtp38.gate.ord1d.rsapps.net (envelope-from ) (ecelerity 4.2.1.56364 r(Core:4.2.1.14)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id B2/77-23597-0B1389A5; Thu, 01 Mar 2018 12:00:33 -0500 Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.89) (envelope-from ) id 1erRYU-000DZ0-M1; Thu, 01 Mar 2018 16:59:42 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1erRYU-000DYu-17 for openvpn-devel@lists.sourceforge.net; Thu, 01 Mar 2018 16:59:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Type:To:Subject:Message-ID:Date:From: References:In-Reply-To:MIME-Version:Sender:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=et8GCC2fW941597Az8UcORX4/gtnfp5Q5FCATO7qYzc=; b=f7BNno/b+S/UNPx5L0cBsdNIL s/2Wsyo+jfw+/XWocMsV26KGEUW4dEgFK7UNqk4ExwaReBcXDD6VbYI8i5yRz4ijkKJwGTjj/Cu9n T421i8j9avewzfCGokzKu9S7Iw5Tu5VfQ4tdwTsnbVI/IBpMUSH0SGkrwRDqJ25Ys2Fn4=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Type:To:Subject:Message-ID:Date:From:References:In-Reply-To: MIME-Version:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=et8GCC2fW941597Az8UcORX4/gtnfp5Q5FCATO7qYzc=; b=ReZrchpSmDW+vA2TgZwubPhjUY 01VveHzdGa2V+vKlrLXPQZHbHavijkwm8EMsLInwAtdySTxsYXq0v93hUqw2BX1Qr7+CbHbKkNND0 R9DlbAM/XCyqpyUvNM+Act1HEjLqgbJN/N7C5nVhjTHPcAjrlh29oXg5OZbd0hzWazes=; Received: from sfi-lb-mx.v20.lw.sourceforge.com ([172.30.20.201] helo=mail-ot0-f175.google.com) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.89) id 1erRYR-000PtT-Hi for openvpn-devel@lists.sourceforge.net; Thu, 01 Mar 2018 16:59:41 +0000 Received: by mail-ot0-f175.google.com with SMTP id t2so6204851otj.4 for ; Thu, 01 Mar 2018 08:59:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=et8GCC2fW941597Az8UcORX4/gtnfp5Q5FCATO7qYzc=; b=qVrCXjiso96n7b3Au6nIpUg8d7gANU5snanAtaaJfGJL3HfyAT/kG/5ljDFLTAngmw MLbKnfLzVLvM3nJn0w/ukesJBx5HlRra/XT5gzXz8mpNgGkiKztP6IqKV/SI1/tvKTPy 79JAyG+Lv9a0WcpIhZz+yDNtBZotuHnJE1jBJkRiaDFLTdTuYiidnMjpi/Un1cTEVepT k+jt6CirePXxdiH3kYWc8oUI6QMc1XYDiijBudhd9PDPY1htw/HEH+ZKo78mJRmtCwmn LVxsSksl+tBadekMBBupmOrQhzlNN4uGx4j/JVB86J64uK9FU6nrAPfyTuZ9mc349E2d SgqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=et8GCC2fW941597Az8UcORX4/gtnfp5Q5FCATO7qYzc=; b=bZGoRa8ytlzqZ8aPo6FEpFAAVLEqoup0CoK6zvZKm/Eax7POA49b4rpknmrHjye9WW jtu46TVo4pDhOiU37VKU2Sb+ixwETzYcOUgasw1m/7y+OFRx1w8aOi62DaAxSGGDaeKK aBGi52ih3+cX2Jk1CmHGRjGusI0fRnxmo8OvY//fN4QPAkcYTmBBXFLJYKTPZLzuoIrz pcjhV+SfRaXtn3fRyBt4OBzin9BIys/MxQr63b1RdTcydxqqm7GuuHVxSgJy7eBmLEGx KNDWRE+Vh963YF/qQFZ+ve9Euptk3VG28Jud1m/W9XxuDYhqsQEtnrAU07l15++xKP6d FzZg== X-Gm-Message-State: AElRT7FaejZCXZZzP0a96QKT0/mCVhhIkccIBa7olNxQM488wkkpbJkh DTLbG3oQKSBBq8hN2HDkFgqP65mt0HC2GjC45ZPu+g== X-Google-Smtp-Source: AG47ELve6MFRhDriz9Ro7JKgoKvGFVe86opkfMIwCPgev/mhKaxrCBwc6Lgsr9sJ238xcPm+O+ilqN3wrBTOIk6Lc/c= X-Received: by 10.157.16.13 with SMTP id h13mr1609724ote.212.1519920593224; Thu, 01 Mar 2018 08:09:53 -0800 (PST) MIME-Version: 1.0 Received: by 10.74.180.201 with HTTP; Thu, 1 Mar 2018 08:09:32 -0800 (PST) In-Reply-To: References: <1480022363-24222-1-git-send-email-selva.nair@gmail.com> <1480051264-30193-1-git-send-email-selva.nair@gmail.com> From: Selva Nair Date: Thu, 1 Mar 2018 11:09:32 -0500 Message-ID: To: openvpn-devel X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (selva.nair[at]gmail.com) 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.0 AWL AWL: Adjusted score from AWL reputation of From: address X-Headers-End: 1erRYR-000PtT-Hi Subject: [Openvpn-devel] Fwd: [PATCH] Delete the IPv6 route to the "connected" network on tun close X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox This one is too old to cleanly apply, but still sending again just to get it into patchwork. (For some reason bouncing to patchwork somehow never works for me, else this could have beaten the oldest pending patch record :) ---------- Forwarded message ---------- From: Selva Nair Date: Thu, Nov 24, 2016 at 4:19 PM Subject: [PATCH] Delete the IPv6 route to the "connected" network on tun close To: openvpn-devel@lists.sourceforge.net Cc: Selva Nair 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(+) -- 2.1.4 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot 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);