Static hosts in auto-generated unbound configuration

Hi,

It seems that one of the recent updates broke my DNS configuration.

I’ve configured unbound to forward local DNS requests to dnsmasq (running on port 5353):

/etc/config/resolver

...
config resolver 'unbound_includes'
        list include_path '/etc/unbound/lan.conf'

/etc/unbound/lan.conf

server:
	domain-insecure: "home.loc."
	private-domain: "home.loc."
	do-not-query-localhost: "no"
stub-zone:
	name: "home.loc."
	stub-addr: "127.0.0.1@5353"
server:
	local-zone: "168.192.in-addr.arpa." nodefault
stub-zone:
	name: "0.168.192.in-addr.arpa."
	stub-addr: "127.0.0.1@5353"

Everything worked fine until something started adding my static DHCP leases from /etc/config/dhcp to the auto-generated /etc/unbound/unbound.conf. Is there a way to disable this behaviour?

Thanks!

Radim

I was able to fix the issue by commenting out the following lines in /etc/init.d/unbound:

if [ -n "$hostname_config" ] && [ -e "$hostname_config" ] ; then
    set_local_zone $hostname_config
fi
config_load dhcp
config_foreach get_local_domain dnsmasq
config_foreach set_local_host host
config_load resolver

I suppose the init script will be overwritten at the next update, though.