UNBOUND_TXT_FWD_ZONE=""
UNBOUND_TXT_HOSTNAME=thisrouter
+UNBOUND_LIST_INSECURE=""
+
##############################################################################
# keep track of local-domain: assignments during inserted resource records
##############################################################################
create_domain_insecure() {
- echo " domain-insecure: \"$1\"" >> $UNBOUND_CONFFILE
+ UNBOUND_LIST_INSECURE="$UNBOUND_LIST_INSECURE $1"
}
##############################################################################
##############################################################################
unbound_conf() {
- local cfg="$1"
- local rt_mem rt_conn modulestring
+ local rt_mem rt_conn modulestring domain
# Make fresh conf file
echo > $UNBOUND_CONFFILE
fi
- # Except and accept domains as insecure (DNSSEC); work around broken domains
- config_list_foreach "$cfg" "domain_insecure" create_domain_insecure
- echo >> $UNBOUND_CONFFILE
+ if [ -n "$UNBOUND_LIST_INSECURE" ] ; then
+ for domain in $UNBOUND_LIST_INSECURE ; do
+ # Except and accept domains without (DNSSEC); work around broken domains
+ echo " domain-insecure: \"$domain\"" >> $UNBOUND_CONFFILE
+ done
+
+
+ echo >> $UNBOUND_CONFFILE
+ fi
}
##############################################################################
config_get UNBOUND_TTL_MIN "$cfg" ttl_min 120
config_get UNBOUND_TXT_DOMAIN "$cfg" domain lan
+ config_list_foreach "$cfg" "domain_insecure" create_domain_insecure
+
UNBOUND_LIST_DOMAINS="nowhere $UNBOUND_TXT_DOMAIN"
if [ "$UNBOUND_D_DHCP_LINK" = "none" ] ; then
unbound_access
unbound_adblock
+
if [ "$UNBOUND_D_DHCP_LINK" = "dnsmasq" ] ; then
dnsmasq_link
else