mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-20 03:16:12 +00:00
Unbound: Fix bad dereference when DHCP lease expires (#4742)
Move deletion of dhcp cache info when the lease expires to after the last reference to the cache information. Fixes #4741
This commit is contained in:
parent
a4ae9b3918
commit
d344d0a773
@ -130,10 +130,10 @@ def run_watcher(target_filename, domain):
|
||||
"dhcpd expired %s @ %s" % (cached_leases[address]['client-hostname'], address)
|
||||
)
|
||||
unbound_control(['local_data_remove', cached_leases[address]['client-hostname']])
|
||||
del cached_leases[address]
|
||||
fqdn = '%s.%s' % (cached_leases[address]['client-hostname'], domain)
|
||||
if unbound_local_data.is_equal(address, fqdn):
|
||||
unbound_local_data.cleanup(address, fqdn)
|
||||
del cached_leases[address]
|
||||
dhcpd_changed = True
|
||||
|
||||
if dhcpd_changed:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user