[4/4] unbound-dhcp-leases-bridge: Fix expiry check on leases

Message ID 20241021163849.1265183-4-michael.tremer@ipfire.org
State New
Headers
Series [1/4] unbound-dhcp-leases-bridge: Don't export expired leases to Unbound |

Commit Message

Michael Tremer Oct. 21, 2024, 4:38 p.m. UTC
  Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
---
 config/unbound/unbound-dhcp-leases-bridge | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

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):