mirror of
https://github.com/openwrt/packages.git
synced 2026-01-10 11:44:48 +00:00
unbound: improve robustness with dhcp scripts
When for example 'package/net/adblock' and DNSSEC vs NTP robustness is enabled, significant restart thrashing can occur at boot up. DHCP lease triggers may be occuring at the same time. Unbounds DNS-DHCP may be incomplete until new DHCP solicit events. Solve this by leaving a passive but complete host conf file during lease trigger. Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
This commit is contained in:
@@ -64,6 +64,7 @@ UNBOUND_PIDFILE=/var/run/unbound.pid
|
||||
|
||||
UNBOUND_SRV_CONF=$UNBOUND_VARDIR/unbound_srv.conf
|
||||
UNBOUND_EXT_CONF=$UNBOUND_VARDIR/unbound_ext.conf
|
||||
UNBOUND_DHCP_CONF=$UNBOUND_VARDIR/unbound_dhcp.conf
|
||||
UNBOUND_CONFFILE=$UNBOUND_VARDIR/unbound.conf
|
||||
|
||||
UNBOUND_KEYFILE=$UNBOUND_VARDIR/root.key
|
||||
@@ -709,6 +710,16 @@ unbound_hostname() {
|
||||
config_load dhcp
|
||||
config_foreach create_interface_dns dhcp
|
||||
fi
|
||||
|
||||
|
||||
if [ -f "$UNBOUND_DHCP_CONF" ] ; then
|
||||
{
|
||||
# Seed DHCP records because dhcp scripts trigger externally
|
||||
# Incremental Unbound restarts may drop unbound-control add records
|
||||
echo " include: $UNBOUND_DHCP_CONF"
|
||||
echo
|
||||
} >> $UNBOUND_CONFFILE
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user