unbound-dhcp-leases-bridge: Don't export expired leases to Unbound

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
This commit is contained in:
Michael Tremer
2024-10-21 16:38:46 +00:00
committed by Arne Fitzenreiter
parent 74849f68c9
commit 17a9ad2f52

View File

@@ -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