mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 10:35:53 +02:00
unbound-dhcp-leases-bridge: Fall back to the default domain
When the bridge cannot detect a domain name for any of the leases, it uses localdomain which is not always the best choice. So instead, this patches changes the behaviour that we read the default domain of the firewall. Signed-off-by: Michael Tremer <michael.tremer@ipfire.org> Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org>
This commit is contained in:
committed by
Peter Müller
parent
a308f5bcde
commit
ca4de26318
@@ -441,8 +441,11 @@ class Lease(object):
|
||||
if address in subnet:
|
||||
return subnets[subnet]
|
||||
|
||||
# Fall back to localdomain if no match could be found
|
||||
return "localdomain"
|
||||
# Load main settings
|
||||
settings = self.read_settings("/var/ipfire/main/settings")
|
||||
|
||||
# Fall back to the host domain if no match could be found
|
||||
return settings.get("DOMAINNAME", "localdomain")
|
||||
|
||||
@staticmethod
|
||||
@functools.cache
|
||||
|
||||
Reference in New Issue
Block a user