unbound-dhcp-bridge: Make leases unique by IP address

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
Michael Tremer
2016-10-15 22:32:05 +01:00
parent 9324732071
commit 13e6019b92

View File

@@ -222,7 +222,7 @@ class DHCPLeases(object):
# exists in the list of known leases. If so replace
# if with the most recent lease
for i, l in enumerate(leases):
if l.hwaddr == lease.hwaddr:
if l.ipaddr == lease.ipaddr:
leases[i] = max(lease, l)
break