1
23.1 Legacy Series / Re: Unbound refuses to serve DNS records for DHCP leases with underscores
« on: July 13, 2023, 10:12:24 pm »
I was able to edit unbound_watcher.py at /usr/local/opnsense/scripts/dhcp/unbound_watcher.py to make
Relevant commits:
https://github.com/opnsense/core/commit/02aae56f05f313e7a5bc59d1e2551864dbea9a12
https://github.com/opnsense/core/commit/2b89ff975f5f0e41c5edec9f3b6cc70967b38db8
FWIW I believe that this should be modified to DNS name rather than Host name, as DNS names allow underscores and there are plenty of real-world scenarios that this breaks. As this behavior was only changed 3 weeks ago, I expect more folks to be affected over time.
Code: [Select]
hostname_pattern = re.compile("(?!-)[A-Z0-9-_]*(?<!-)$", re.IGNORECASE)
. This allows unbound to serve the records properly.Relevant commits:
https://github.com/opnsense/core/commit/02aae56f05f313e7a5bc59d1e2551864dbea9a12
https://github.com/opnsense/core/commit/2b89ff975f5f0e41c5edec9f3b6cc70967b38db8
FWIW I believe that this should be modified to DNS name rather than Host name, as DNS names allow underscores and there are plenty of real-world scenarios that this breaks. As this behavior was only changed 3 weeks ago, I expect more folks to be affected over time.