From patchwork Mon Oct 21 16:38:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 8199 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 4XXLc44CDwz3wmx for ; Mon, 21 Oct 2024 16:39:00 +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 4XXLc04fVmz3lB; 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 4XXLc04653z343j; 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 4XXLbw2n12z303Q 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) server-digest SHA256 client-signature ECDSA (secp384r1) client-digest SHA384) (Client CN "michael.haj.ipfire.org", Issuer "E6" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4XXLbv5rTvzmh; Mon, 21 Oct 2024 16:38:51 +0000 (UTC) Received: by michael.haj.ipfire.org (Postfix, from userid 0) id 4XXLbv4Nn1zTgKx; Mon, 21 Oct 2024 16:38:51 +0000 (UTC) From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH 1/4] unbound-dhcp-leases-bridge: Don't export expired leases to Unbound Date: Mon, 21 Oct 2024 16:38:46 +0000 Message-Id: <20241021163849.1265183-1-michael.tremer@ipfire.org> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 Message-ID-Hash: NPMKYJEEQEMZ3BSM3ZJSZXYZC7GW7C2M X-Message-ID-Hash: NPMKYJEEQEMZ3BSM3ZJSZXYZC7GW7C2M 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 Reviewed-by: Bernhard Bitsch --- 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 986fae2d2..bc944a073 100644 --- a/config/unbound/unbound-dhcp-leases-bridge +++ b/config/unbound/unbound-dhcp-leases-bridge @@ -276,7 +276,7 @@ class UnboundDHCPLeasesBridge(object): if lease.has_expired(): log.debug(" Expired") - self.unbound.update_dhcp_leases(self.leases) + self.unbound.update_dhcp_leases([l for l in self.leases if not l.has_expired()]) def _add_lease(self, lease): # Skip leases without an FQDN