[LEDE-DEV] [PATCH v3] dnsmasq: manage resolv.conf if when listening on 127.0.0.1#53

e9hack e9hack at gmail.com
Tue Jun 20 07:41:17 PDT 2017


Am 18.06.2017 um 09:46 schrieb Paul Oranje:
> @@ -854,14 +895,15 @@ dnsmasq_start()
>  	config_get_bool cachelocal "$cfg" cachelocal 1
>
>  	config_get_bool noresolv "$cfg" noresolv 0
> -	if [ "$noresolv" != "1" ]; then
> +	if [ "$noresolv" = "1" ]; then
> +		xappend "--no-resolv"
> +	else
>  		config_get resolvfile "$cfg" resolvfile "/tmp/resolv.conf.auto"
> +		xappend "--resolv-file=$resolvfile"
>  		# So jail doesn't complain if file missing
> -		[ -n "$resolvfile" -a \! -e "$resolvfile" ] && touch "$resolvfile"
> +		[ -e "$resolvfile" ] && touch "$resolvfile"

Are your sure, that the last line is correct? I'm missing a NOT in the test.

If option resolvfile is not given and multiple configuration does exist, every instance updates the same resolve file.
Wouldn't it be better to use unique file names?

Regards,
Hartmut



More information about the Lede-dev mailing list