fff-dhcp: add fallback dns server

If the user did not specify a dns server, set a fallback.  Since we
already have multiple servers available on an anycast address, this
address is chosen instead of as specific server.  This should avoid the
issue that the default server might deprecate suddenly.

A warning is still displayed to remind the user to conscientiously
choose a server and not rely on defaults.

Signed-off-by: Johannes Kimmel <fff@bareminimum.eu>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
This commit is contained in:
Johannes Kimmel 2021-01-06 10:22:35 +01:00 committed by Fabian Bläse
parent 7fd6b40225
commit 7afe817f7d
1 changed files with 4 additions and 1 deletions

View File

@ -8,7 +8,10 @@ configure() {
uci add_list dhcp.@dnsmasq[0].server="/ip6.arpa/$f"
done
else
echo "WARNING: No DNS servers set!"
echo "WARNING: No DNS servers set! Using default server fd43:5602:29bd:ffff:1:1:1:1"
uci add_list dhcp.@dnsmasq[0].server="fd43:5602:29bd:ffff:1:1:1:1"
uci add_list dhcp.@dnsmasq[0].server="/in-addr.arpa/fd43:5602:29bd:ffff:1:1:1:1"
uci add_list dhcp.@dnsmasq[0].server="/ip6.arpa/fd43:5602:29bd:ffff:1:1:1:1"
fi
}