From patchwork Mon Oct 21 16:38:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 8200 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature RSA-PSS (4096 bits)) (Client CN "mail01.haj.ipfire.org", Issuer "R10" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4XXLc51NKkz3x2Q for ; Mon, 21 Oct 2024 16:39:01 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) client-signature ECDSA (secp384r1)) (Client CN "mail02.haj.ipfire.org", Issuer "E6" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4XXLc05vpqz4XY; Mon, 21 Oct 2024 16:38:56 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4XXLc05MRQz34Gx; Mon, 21 Oct 2024 16:38:56 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature RSA-PSS (4096 bits)) (Client CN "mail01.haj.ipfire.org", Issuer "R10" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4XXLbw32Pgz303Q for ; Mon, 21 Oct 2024 16:38:52 +0000 (UTC) Received: from michael.haj.ipfire.org (michael.haj.ipfire.org [172.28.1.242]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) client-signature ECDSA (secp384r1)) (Client CN "michael.haj.ipfire.org", Issuer "E6" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4XXLbw0m97z2G5; Mon, 21 Oct 2024 16:38:52 +0000 (UTC) Received: by michael.haj.ipfire.org (Postfix, from userid 0) id 4XXLbv4hzfzTgbf; Mon, 21 Oct 2024 16:38:51 +0000 (UTC) From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH 4/4] unbound-dhcp-leases-bridge: Fix expiry check on leases Date: Mon, 21 Oct 2024 16:38:49 +0000 Message-Id: <20241021163849.1265183-4-michael.tremer@ipfire.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241021163849.1265183-1-michael.tremer@ipfire.org> References: <20241021163849.1265183-1-michael.tremer@ipfire.org> MIME-Version: 1.0 Message-ID-Hash: PKJ6YGXZP7QCKYVVQK47CZGDRGC6HNAD X-Message-ID-Hash: PKJ6YGXZP7QCKYVVQK47CZGDRGC6HNAD X-MailFrom: root@michael.haj.ipfire.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Michael Tremer X-Mailman-Version: 3.3.8 Precedence: list List-Id: IPFire development talk Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Signed-off-by: Michael Tremer --- config/unbound/unbound-dhcp-leases-bridge | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/unbound/unbound-dhcp-leases-bridge b/config/unbound/unbound-dhcp-leases-bridge index 66ea28054..4a6f9587f 100644 --- a/config/unbound/unbound-dhcp-leases-bridge +++ b/config/unbound/unbound-dhcp-leases-bridge @@ -717,7 +717,7 @@ class Lease(object): if not self.time_ends: return self.time_starts > datetime.datetime.utcnow() - return self.time_starts > datetime.datetime.utcnow() > self.time_ends + return not self.time_starts < datetime.datetime.utcnow() < self.time_ends @property def rrset(self):