Commit 9ccd3344 authored by Tails developers's avatar Tails developers

Allow zero or more DNS servers set by NetworkManager (Will-fix: #8902).

According to NetworkManager(8) IP4_NAMESERVERS is a space separated
list.
parent 9ab9774e
......@@ -100,7 +100,7 @@ if [ -r "${NM_ENV_FILE}" ]; then
# script. Note that while the regex used for deciding IP addresses
# is far from perfect, it serves our purpose here.
IP4_REGEX='[0-9]{1,3}(\.[0-9]{1,3}){3}'
NAMESERVERS_REGEX="^IP4_NAMESERVERS=\"${IP4_REGEX}\"$"
NAMESERVERS_REGEX="^IP4_NAMESERVERS=\"(${IP4_REGEX}( ${IP4_REGEX})*)?\"$"
if grep --extended-regexp -qv "${NAMESERVERS_REGEX}" "${NM_ENV_FILE}"; then
error "`gettext \"NetworkManager passed us garbage data when trying to deduce the clearnet DNS server.\"`"
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment