From patchwork Tue Nov 12 23:07:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Yan X-Patchwork-Id: 917 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 cJpuLCrWy13oEgAAIUCqbw for ; Wed, 13 Nov 2019 05:08:42 -0500 Received: from proxy15.mail.iad3b.rsapps.net ([172.31.255.6]) by director12.mail.ord1d.rsapps.net with LMTP id EAXaKSrWy10PbAAAIasKDg ; Wed, 13 Nov 2019 05:08:42 -0500 Received: from smtp20.gate.iad3b ([172.31.255.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy15.mail.iad3b.rsapps.net with LMTP id 8FyPIyrWy12TNAAAhyf7VQ ; Wed, 13 Nov 2019 05:08:42 -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: smtp20.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: 91aa6c9a-05fd-11ea-a8aa-525400497f28-1-1 Received: from [216.105.38.7] ([216.105.38.7:37694] helo=lists.sourceforge.net) by smtp20.gate.iad3b.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 4A/6B-19576-A26DBCD5; Wed, 13 Nov 2019 05:08:42 -0500 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 1iUpYu-0005Nf-TT; Wed, 13 Nov 2019 10:07:44 +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 1iUpYt-0005NL-Tb for openvpn-devel@lists.sourceforge.net; Wed, 13 Nov 2019 10:07:43 +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=fad6sl6cruE1X3IU1JKK0kgcrCHM936Nq0JvzzaJ2ao=; b=WAA/SqcouSEZaGJQNEyGdlUzeV bzOBLV1+G/ixVFNKs9OYRKDTUelmeAmGuwz68XbQFHQ4jyCx1cRrJDXrg+e+aMD6wRgkBNFZJA6qr uotym1q9gYm8/sShFXuu5pjQ8jSuMzrKGzMuQq523uk3vKBxKK+TRLPAIKpPLxzC5rPo=; 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=fad6sl6cruE1X3IU1JKK0kgcrCHM936Nq0JvzzaJ2ao=; b=TCCxfUpZs2ey++qCwMLX+5+SnH tlCvCLpzGSFJK/EhVKWbwudCBFSI9uluo4hegge5H8GDOkZq73U8ILT6bwxTr8QVSmuZSDaHhy0K1 ZKtEIJkPKnYCVzFjZftoOF2XeDjNl4dhrlFjKkFPwCxuASdNC9X68iWzYNaeJsOjVHYc=; Received: from mail-pf1-f173.google.com ([209.85.210.173]) by sfi-mx-3.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92.2) id 1iUpYs-00Enyo-PG for openvpn-devel@lists.sourceforge.net; Wed, 13 Nov 2019 10:07:43 +0000 Received: by mail-pf1-f173.google.com with SMTP id n13so1344235pff.1 for ; Wed, 13 Nov 2019 02:07:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fad6sl6cruE1X3IU1JKK0kgcrCHM936Nq0JvzzaJ2ao=; b=p837dCKuPBd4d0HDsK4lnSf1tGC9zOqljnZPX8w60Zlf3DX0Pew0Fpti9uu3fCpOGT Q9aNJTBuTE85GNf99neKZSroDpSHtya+qMNuz4bLsO3A5Pc/Ar1MnD+vfrqzUS+Tc3BH uKQQ3c060Yyg9K54u8GsDzYvYgDlJGW09p7bPQ86AXnI1+1bOK4QlsymtVZU6G6Y5chN 7/dN8JskvnNAkyeaEDnf9lzpcMaPLNaC4HR8h8TIpsKz70e5Z0G54aHGdhYx2ZYQAr6u Tv32cGqUI6oAE+YcqvqSJIz7yGybcSnkzmA5tF3gmfakL0Du2czuYNJnNcrXkygxlGN6 x4fg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=fad6sl6cruE1X3IU1JKK0kgcrCHM936Nq0JvzzaJ2ao=; b=XDPelbGeMNK3gNHqsj+cCxryMQYwm2kPXtHiSxZKu9JNGgPAnpIZ6lNCzOdL/t/c2R mRvg5B41uqJl295cg+XTQu+VK9GXwI3/ECMRGKM82tnJA2+/FRV4//5FnkhvlhGjYpLE 0d78d6lm5Q/fDFEuHPPgpd4o5jAXsY+oKvm+032bsj//MdCZraSx3gzyoS7YmAg1lIaq cV+T+nD/4/nQI+mzDyGVU74lnTOkCXelSSa9UiXVRvs3fwpU3rT0wjpzbqdx0SCj8ioL Kng9OxyIc0hRlFITKAb/QOiThscvVRRFl/0AkWp34b4yVBnOFiEVd2Ya18JbUfJ1Y6xb s4cg== X-Gm-Message-State: APjAAAVeOKbn6muxd7azOfh37FS6ijIBCYrFxfjCIZm/z39gMeYmqcwk oo/aeOXLmz6BxHWv8ymfjxgKLKGA X-Google-Smtp-Source: APXvYqx2rMgMQG+1eo/7e891afqnWUpEHBiqw/ZHXR/pmHMrTf37je00E08SWGTYxHQVaArK1jAoMg== X-Received: by 2002:a17:90a:b28c:: with SMTP id c12mr1554123pjr.22.1573639656623; Wed, 13 Nov 2019 02:07:36 -0800 (PST) Received: from localhost.localdomain (123202047155.ctinets.com. [123.202.47.155]) by smtp.gmail.com with ESMTPSA id d6sm2113297pfn.32.2019.11.13.02.07.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Nov 2019 02:07:35 -0800 (PST) From: Tom Yan To: openvpn-devel@lists.sourceforge.net Date: Wed, 13 Nov 2019 18:07:01 +0800 Message-Id: <20191113100702.6863-3-tom.ty89@gmail.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <61c1b837-3f81-6783-5934-8128bb81881b@unstable.cc> References: <61c1b837-3f81-6783-5934-8128bb81881b@unstable.cc> 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 (tom.ty89[at]gmail.com) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.210.173 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.210.173 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (tom.ty89[at]gmail.com) -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 RCVD_IN_MSPIKE_WL Mailspike good senders X-Headers-End: 1iUpYs-00Enyo-PG Subject: [Openvpn-devel] [PATCH v2 3/4] Avoid reserving one more address at pool end 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 It appears to be a copy-and-paste kind of typo (pool start is network address + 2). --- src/openvpn/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openvpn/helper.c b/src/openvpn/helper.c index 5b2ca0cc..6e2f0891 100644 --- a/src/openvpn/helper.c +++ b/src/openvpn/helper.c @@ -349,7 +349,7 @@ helper_client_server(struct options *o) { o->ifconfig_pool_defined = true; o->ifconfig_pool_start = o->server_network + ptp + 1; - o->ifconfig_pool_end = (o->server_network | ~o->server_netmask) - ptp * 2; + o->ifconfig_pool_end = (o->server_network | ~o->server_netmask) - ptp; ifconfig_pool_verify_range(M_USAGE, o->ifconfig_pool_start, o->ifconfig_pool_end); } o->ifconfig_pool_netmask = o->server_netmask;