From patchwork Sat Apr 3 06:24:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Selva Nair X-Patchwork-Id: 1708 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director12.mail.ord1d.rsapps.net ([172.31.255.6]) by backend30.mail.ord1d.rsapps.net with LMTP id kHn8DQulaGAqVQAAIUCqbw (envelope-from ) for ; Sat, 03 Apr 2021 13:25:31 -0400 Received: from proxy13.mail.iad3b.rsapps.net ([172.31.255.6]) by director12.mail.ord1d.rsapps.net with LMTP id iF/JDQulaGBFUgAAIasKDg (envelope-from ) for ; Sat, 03 Apr 2021 13:25:31 -0400 Received: from smtp7.gate.iad3b ([172.31.255.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy13.mail.iad3b.rsapps.net with LMTPS id QCIUBwulaGDNIAAAvUvv+w (envelope-from ) for ; Sat, 03 Apr 2021 13:25:31 -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: smtp7.gate.iad3b.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-Suspicious-Flag: YES X-Classification-ID: 9691a10e-94a1-11eb-82d7-525400e292e5-1-1 Received: from [216.105.38.7] ([216.105.38.7:48928] helo=lists.sourceforge.net) by smtp7.gate.iad3b.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 07/8B-06552-A05A8606; Sat, 03 Apr 2021 13:25:30 -0400 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 1lSk0c-0004cP-Vu; Sat, 03 Apr 2021 17:24:30 +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 1lSk0b-0004cD-WD for openvpn-devel@lists.sourceforge.net; Sat, 03 Apr 2021 17:24:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:Content-Type:MIME-Version :Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=7UCMCsNdZPpXVWMNnG7Sk/5n9OtKVUay1rSaGk1Aiqk=; b=D7uDX5kSn4OVb3jx+GlaegH6kr rUW1szUyl8e1l6uuG/90mPFqKQWvOO7ddP37idSGtMyvIpuKdcdLbG6rZC+7LfTE6OKuUZ1KzJkjs b0blWNI1zpDUmO6CNmCxOzPdW8KRt6VijMpk1An8YGVTYIrVyh3AlvD1bPyPxaG22ZJ0=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=7UCMCsNdZPpXVWMNnG7Sk/5n9OtKVUay1rSaGk1Aiqk=; b=i BmjpcL68JE9BXpphsQg1YXd8YjxWMXJScGOVa907t80IL0ybk5CutF0Iy7FxRnjRICppkGVS7R4Dy rh0W+xGlQUXsNi8Abvsqbl3JwDyXcIIDMzcU6DzO3QWLU0t90XmC9+eVrkG2Q7WpiqOpDSKCVxtnq VMXLsaO9ffFzXRAk=; Received: from mail-qk1-f178.google.com ([209.85.222.178]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92.3) id 1lSk0K-0001bC-7i for openvpn-devel@lists.sourceforge.net; Sat, 03 Apr 2021 17:24:29 +0000 Received: by mail-qk1-f178.google.com with SMTP id o5so8015533qkb.0 for ; Sat, 03 Apr 2021 10:24:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=7UCMCsNdZPpXVWMNnG7Sk/5n9OtKVUay1rSaGk1Aiqk=; b=GrbXiyY0BIOwCGQ6nCbKWx4HzBivp6hqiYkosvZ+G181H/yaEtgAL/WRkaiDEqJHvO ZOiWxVokB3SlJqLCsOqjxstt1agky/xwnafrJ9SGJfpMWrCUrIIBEUEIRcfyZ4gRfmMv ncw3BFSmkEIzFA46oiTbVznDzC8UFsalKAAlQ+++nRtNoMoLYWqY5j+22Yk5ntAnrd1t em3+GCMR7smSwWOT8ZX4BIwGq2DtHmw2WZ6IuhwBNgiGuDrCAO3nCUoDArtZiLuKd7Lp 5z70Q2vTEiyZkHUMJUk2qs9Xfy71+nOuPv1r28kRhS0Neo0amwcMJJ4iL4Vin+GntQzf DSJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=7UCMCsNdZPpXVWMNnG7Sk/5n9OtKVUay1rSaGk1Aiqk=; b=kHhuBsN32yNCXV6eoYnt7pMMieImC7TvSaQb3zcq3T0ZBDPBVrebdB3fwCptKfajJ9 H73PAe4Q57uAWf12KIRvm3BLVEBW6vnMDQwHifI0E63gwuJPyGYE//c1ZVf1FhWwTSQn q3hetgRB7dN524M4ncwkBUWDaDqVIcmkxCrotRTcSPpYzybJXHozIa61UWG4pFd/wTqj rhOZ+nP2aEiZnNybzjRY/kXKgxTHWtc2UWGmSU0vFXnp4caseoIcPAb7yj0g08zOF1WW 3b52biFMPrN45vrSNOzurFhjFcB1Yvm4pA4SfcmHhu6TTs2jss7f6q9XbOFmM+vXcGDK UcAw== X-Gm-Message-State: AOAM531FI8qbdgYsQ5+3dlqXX/hZXUYnbRZRO+CAtz9FJKze/cBU3Jn0 3UwuaDAJvpBFNn0gfjPORpB482AQeFEQCg== X-Google-Smtp-Source: ABdhPJx45HCYkpxvy1zS2A+yqanI1OfkpqA1tQRJrCQSxouV7acDIEvLHb73K7FgGGMw0Z66qQu/tQ== X-Received: by 2002:a37:886:: with SMTP id 128mr18799578qki.430.1617470646061; Sat, 03 Apr 2021 10:24:06 -0700 (PDT) Received: from uranus.home.sansel.ca ([2607:fea8:3f23:3000:4637:e6ff:fee6:e826]) by smtp.gmail.com with ESMTPSA id d2sm833597qtg.29.2021.04.03.10.24.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Apr 2021 10:24:05 -0700 (PDT) From: selva.nair@gmail.com To: openvpn-devel@lists.sourceforge.net Date: Sat, 3 Apr 2021 13:24:03 -0400 Message-Id: <20210403172403.9452-1-selva.nair@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 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) -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.222.178 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.222.178 listed in list.dnswl.org] -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 X-Headers-End: 1lSk0K-0001bC-7i Subject: [Openvpn-devel] [PATCH] tun.c on WIN32: remove more unused variables 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 From: Selva Nair Fixes: tun.c: In function ‘do_ifconfig_ipv4’: tun.c:1217:17: warning: variable ‘ifconfig_remote_netmask’ set but not used [-Wunused-but-set-variable] const char *ifconfig_remote_netmask = NULL; tun.c:1213:10: warning: unused variable ‘tun’ [-Wunused-variable] bool tun = is_tun_p2p(tt); Signed-off-by: Selva Nair Acked-by: Antonio Quartulli --- src/openvpn/tun.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c index 6b7c8ef1..8ff825f4 100644 --- a/src/openvpn/tun.c +++ b/src/openvpn/tun.c @@ -1207,10 +1207,12 @@ static void do_ifconfig_ipv4(struct tuntap *tt, const char *ifname, int tun_mtu, const struct env_set *es, openvpn_net_ctx_t *ctx) { +#if !defined(_WIN32) && !defined(TARGET_ANDROID) /* * We only handle TUN/TAP devices here, not --dev null devices. */ bool tun = is_tun_p2p(tt); +#endif #if !defined(TARGET_LINUX) const char *ifconfig_local = NULL; @@ -1534,7 +1536,7 @@ do_ifconfig_ipv4(struct tuntap *tt, const char *ifname, int tun_mtu, msg(M_INFO, "******** NOTE: Please manually set the IP/netmask of '%s' to %s/%s (if it is not already set)", ifname, ifconfig_local, - print_in_addr_t(tt->adapter_netmask, 0, &gc)); + ifconfig_remote_netmask); } else if (tt->options.ip_win32_type == IPW32_SET_DHCP_MASQ || tt->options.ip_win32_type == IPW32_SET_ADAPTIVE) {