Allow underscores in DNS names from DHCP leases (#6665)

This commit is contained in:
bugfixin 2023-07-19 00:33:34 -07:00 committed by GitHub
parent dd0506971a
commit efefa10b18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -49,7 +49,7 @@ def run_watcher(target_filename, default_domain, watch_file, service_pid):
# initiate lease watcher and setup cache
dhcpdleases = watchers.dhcpd.DHCPDLease(watch_file)
cached_leases = dict()
hostname_pattern = re.compile("(?!-)[A-Z0-9-]*(?<!-)$", re.IGNORECASE)
hostname_pattern = re.compile("(?!-)[A-Z0-9-_]*(?<!-)$", re.IGNORECASE)
# start watching dhcp leases
last_cleanup = time.time()

View File

@ -136,7 +136,7 @@ def run_watcher(target_filename, default_domain, watch_file, config):
dhcpdleases = watchers.dhcpd.DHCPDLease(watch_file)
cached_leases = dict()
unbound_local_data = UnboundLocalData()
hostname_pattern = re.compile("(?!-)[A-Z0-9-]*(?<!-)$", re.IGNORECASE)
hostname_pattern = re.compile("(?!-)[A-Z0-9-_]*(?<!-)$", re.IGNORECASE)
# start watching dhcp leases
last_cleanup = time.time()