From patchwork Wed Sep 23 20:44:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kristof Provost via Openvpn-devel X-Patchwork-Id: 1472 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director11.mail.ord1d.rsapps.net ([172.27.255.52]) by backend30.mail.ord1d.rsapps.net with LMTP id MBRNI9JAbF+PAgAAIUCqbw (envelope-from ) for ; Thu, 24 Sep 2020 02:46:42 -0400 Received: from proxy2.mail.iad3a.rsapps.net ([172.27.255.52]) by director11.mail.ord1d.rsapps.net with LMTP id uPoVI9JAbF8TNAAAvGGmqA (envelope-from ) for ; Thu, 24 Sep 2020 02:46:42 -0400 Received: from smtp23.gate.iad3a ([172.27.255.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy2.mail.iad3a.rsapps.net with LMTPS id ANkTHdJAbF/6ZAAABcWvHw (envelope-from ) for ; Thu, 24 Sep 2020 02:46:42 -0400 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: smtp23.gate.iad3a.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=pass header.d=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=rozman.si; dmarc=pass (p=none; dis=none) header.from=lists.sourceforge.net X-Suspicious-Flag: NO X-Classification-ID: b343a4de-fe31-11ea-b3d1-52540033eb40-1-1 Received: from [216.105.38.7] ([216.105.38.7:52662] helo=lists.sourceforge.net) by smtp23.gate.iad3a.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 82/F9-31091-0D04C6F5; Thu, 24 Sep 2020 02:46:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.sourceforge.net; s=beta; h=Content-Transfer-Encoding:Content-Type: Reply-To:From:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Subject:MIME-Version:References:In-Reply-To: Message-Id:Date:To:Sender:Cc:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=5kfS1rPtLy43vw55FoYiNXsqU/Im9gubzInD33LbcdQ=; b=ValsT58y16cCLNZOYzNUY/u5I Kp7W04QLmtwPVl2WOHKMSKztUp9OCzORFNj44dzb/pbk/fYaAFDtw154/GsdqWNiEHNV+XkS3nbdW O8rCBUEwEgGOKxNwIMrTojEU+bE+YXYYasZSX1YBLNezBNiBdv5irgsM64NpOmlvycw2M=; Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1kLL0a-00082Y-M1; Thu, 24 Sep 2020 06:45:36 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kLL0Z-00082N-VF for openvpn-devel@lists.sourceforge.net; Thu, 24 Sep 2020 06:45:35 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: 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=fKABGI58ZKJFOeKm9mtKlt8j2skkgle8LeoCjBque8k=; b=FURD4DsvWbR3ShGGVpjaqmXPnw B1R/eCUT4ViLnb4oSxpIEI8ccufH04306nBLDaqAcxQYGImslYe20hw3bfLjF6OdP73N7X7LyFAoF 9CO65/jgfpSzDhXy9EJGhtqhevH9ID7+jFdhVAlPg/B3bQg59yGLvm9VApE9Ru61V7GE=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: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=fKABGI58ZKJFOeKm9mtKlt8j2skkgle8LeoCjBque8k=; b=CDQ3aGf/uHilEPLV328UpoVYeH TPYwO7RKnAke1v4+5iSMXedq87jfBEMg7fnQhF0/T3SnZecIuFu1eyrW4clHa7ac0WM6qp/tsVx/R ysryEHlmGYLOzSVBjOfyNEzkqfidqFiRcEmKSWqvj4//bphR/Ejrwt4Dz8AfamBgCZ2E=; Received: from pub5.amebis.si ([213.250.55.21]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1kLL0J-005gPU-Al for openvpn-devel@lists.sourceforge.net; Thu, 24 Sep 2020 06:45:35 +0000 Received: by pub5.amebis.si (Postfix, from userid 1000) id B449F1002FA3; Thu, 24 Sep 2020 08:45:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rozman.si; s=default; t=1600929909; bh=fKABGI58ZKJFOeKm9mtKlt8j2skkgle8LeoCjBque8k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NhwCotmP5TF3/5SXb3hvLz96gyX2KdO/glJ40ZRhVNhGJ3DNOy1aIBDMxFE+eFmmZ dqwz/6GCr3pqDVirwXp1lqU5G1uiKhTm1gC2IiiasEwxd+gHMPeP+N0VsEsgoL+y/b X0mhyRVoTpZXRFtJSBMEl6Lr3M5tvGHYKRZnC1to= X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on brana.amebis.doma X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 Received: from SR6.amebis.doma (unknown [IPv6:2a00:ee2:209:164:8103:4a53:d5f0:1d48]) by pub5.amebis.si (Postfix) with ESMTP id 7FFF4100251B; Thu, 24 Sep 2020 08:45:07 +0200 (CEST) To: openvpn-devel@lists.sourceforge.net Date: Thu, 24 Sep 2020 08:44:52 +0200 Message-Id: <20200924064452.1001-3-simon@rozman.si> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200924064452.1001-1-simon@rozman.si> References: <20200924064452.1001-1-simon@rozman.si> MIME-Version: 1.0 X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: rozman.si] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 0.0 TIME_LIMIT_EXCEEDED Exceeded time limit / deadline X-Headers-End: 1kLL0J-005gPU-Al Subject: [Openvpn-devel] [PATCH 3/3] netsh: Delete WINS servers 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: , X-Patchwork-Original-From: Simon Rozman via Openvpn-devel From: Kristof Provost via Openvpn-devel Reply-To: Simon Rozman Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox Signed-off-by: Simon Rozman Acked-by: Lev Stipakov --- src/openvpn/tun.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c index b1cd7a1b..80ae6958 100644 --- a/src/openvpn/tun.c +++ b/src/openvpn/tun.c @@ -6706,6 +6706,16 @@ netsh_delete_address_dns(const struct tuntap *tt, bool ipv6, struct gc_arena *gc netsh_command(&argv, 1, M_WARN); } + if (!ipv6 && tt->options.wins_len > 0) + { + argv_printf(&argv, + "%s%s interface ipv4 delete winsservers %lu all", + get_win_sys_path(), + NETSH_PATH_SUFFIX, + tt->adapter_index); + netsh_command(&argv, 1, M_WARN); + } + if (ipv6 && tt->type == DEV_TYPE_TUN) { delete_route_connected_v6_net(tt);