From patchwork Thu Jul 9 00:16:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arne Schwabe X-Patchwork-Id: 1218 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director12.mail.ord1d.rsapps.net ([172.28.255.1]) by backend30.mail.ord1d.rsapps.net with LMTP id sNRbJKHuBl+hVAAAIUCqbw for ; Thu, 09 Jul 2020 06:17:05 -0400 Received: from proxy2.mail.ord1c.rsapps.net ([172.28.255.1]) by director12.mail.ord1d.rsapps.net with LMTP id GF5lJKHuBl8ETgAAIasKDg ; Thu, 09 Jul 2020 06:17:05 -0400 Received: from smtp13.gate.ord1c ([172.28.255.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy2.mail.ord1c.rsapps.net with LMTP id wBLwI6HuBl8nagAA311kuQ ; Thu, 09 Jul 2020 06:17:05 -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: smtp13.gate.ord1c.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; dmarc=none (p=nil; dis=none) header.from=rfc2549.org X-Suspicious-Flag: YES X-Classification-ID: 563e55fe-c1cd-11ea-92d7-bc305bf03494-1-1 Received: from [216.105.38.7] ([216.105.38.7:46958] helo=lists.sourceforge.net) by smtp13.gate.ord1c.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 7D/6A-20374-1AEE60F5; Thu, 09 Jul 2020 06:17:05 -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 1jtTbU-0002Es-7r; Thu, 09 Jul 2020 10:16:32 +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 1jtTbH-0002DB-1w for openvpn-devel@lists.sourceforge.net; Thu, 09 Jul 2020 10:16:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=References:In-Reply-To:Message-Id:Date:Subject:To: From:Sender:Reply-To:Cc:MIME-Version:Content-Type: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=r2Gox2dBufvtuFACCzog6+mwFEBeUqtp8K/rGFZWR/w=; b=MLwvSb/gg/gFStksYfiS4RrPAu ijwC95w2ZNMnvKs0ln0K1YXOFT1xkAKF9oYMoSreMNwo6FG3ifWv9+d1i8Z7rar161hMua8y7r5Sc YAsm5VHiJMm1WchqyHWu2UzDRvTGZcc4QvgOs4oSJK/tWWM0VFe1TDUJCgBTeQ/qpcGA=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=References:In-Reply-To:Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc :MIME-Version:Content-Type: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=r2Gox2dBufvtuFACCzog6+mwFEBeUqtp8K/rGFZWR/w=; b=HHuArTV0wglb+mFRARyEwHPZRe ZRMcNs2r6HQPCchGwwmfrfvNfjaGKYpRis68Tnq6d7UKdIsEahb+IdkGDuQ7DtVFx8Ir3qWKhW8Mr 8vMGR7uYtb7IWSpZl9GraJYBV+lo51PiR9VWZma6tG2i+27hE+JPpDyvwT+ued3QbOtI=; Received: from mail.blinkt.de ([192.26.174.232]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1jtTbF-000gge-VR for openvpn-devel@lists.sourceforge.net; Thu, 09 Jul 2020 10:16:19 +0000 Received: from kamera.blinkt.de ([2001:638:502:390:20c:29ff:fec8:535c]) by mail.blinkt.de with smtp (Exim 4.92.3 (FreeBSD)) (envelope-from ) id 1jtTb2-000HY8-4L for openvpn-devel@lists.sourceforge.net; Thu, 09 Jul 2020 12:16:04 +0200 Received: (nullmailer pid 12010 invoked by uid 10006); Thu, 09 Jul 2020 10:16:03 -0000 From: Arne Schwabe To: openvpn-devel@lists.sourceforge.net Date: Thu, 9 Jul 2020 12:16:03 +0200 Message-Id: <20200709101603.11941-8-arne@rfc2549.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200709101603.11941-1-arne@rfc2549.org> References: <20200709101603.11941-1-arne@rfc2549.org> 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: rfc2549.org] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-Headers-End: 1jtTbF-000gge-VR Subject: [Openvpn-devel] [PATCH 8/8] Code cleanup: remove superflous variable 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: , MIME-Version: 1.0 Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox Signed-off-by: Arne Schwabe Acked-by: Antonio Quartulli --- src/openvpn/ssl.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/openvpn/ssl.c b/src/openvpn/ssl.c index 4ee4c245..54a23011 100644 --- a/src/openvpn/ssl.c +++ b/src/openvpn/ssl.c @@ -1231,11 +1231,10 @@ lame_duck_must_die(const struct tls_session *session, interval_t *wakeup) const struct key_state *lame = &session->key[KS_LAME_DUCK]; if (lame->state >= S_INITIAL) { - const time_t local_now = now; ASSERT(lame->must_die); /* a lame duck key must always have an expiration */ - if (local_now < lame->must_die) + if (now < lame->must_die) { - compute_earliest_wakeup(wakeup, lame->must_die - local_now); + compute_earliest_wakeup(wakeup, lame->must_die - now); return false; } else