Unbound reload on rc.newwanip even when generated host entries are unchanged
-
I am seeing a reproducible ~30–40 second DNS outage during WAN failback on pfSense Plus 26.07-RELEASE on a Netgate 6100.
I have traced this to the following path:
rc.newwanip → system_hosts_generate() → unbound_hosts_generate() → unbound_control("reload")WAN/WAN2 are not configured as Unbound listening interfaces, and the interface guard in
services_unbound_configure()is present and working.However,
system_hosts_generate()still callsunbound_hosts_generate(), which unconditionally reloads Unbound.I verified that both
/etc/hostsand/var/unbound/host_entries.confare byte-for-byte unchanged before and after a complete WAN failover/failback cycle.In my case this is particularly visible because pfBlockerNG runs in Unbound mode with a large DNSBL configuration:
/var/unbound/pfb_dnsbl.conf 96 MB 1,144,725 linesunbound-checkconf /var/unbound/unbound.conftakes 37.38 seconds, and a direct pfSense-style Unbound reload produces approximately the same DNS outage.I tested a local patch to
unbound_hosts_generate()which compareshost_entries.confbefore/after generation and only callsunbound_control("reload")when the content actually changed.With that patch:
WAN1 → WAN2 failover: DNS remains available WAN2 → WAN1 failback: DNS remains available resolver.log: no Unbound reload during failbackWould it make sense for pfSense to avoid the Unbound reload when the generated
host_entries.confis unchanged?This appears related to, but distinct from, #12612 because the reload occurs through
system_hosts_generate()rather than the later guardedservices_unbound_configure()path.
Privacy Policy · Cookie Policy