Re: Possible documentation bug in openresolv
Roy Marples
Tue Sep 17 19:35:44 2019
Hi Fred
On 17/09/2019 11:03, Fred Brennan wrote:
Greetings,
I apologize if this has been discussed before; there is no way to check as the
archives are down.
Archives are up here:
https://roy.marples.name/archives/openresolv-discuss/
I use Arch Linux, the bundled `resolvconf` command is openresolv. I was trying
to do something I thought simple, add the nameserver 127.3.2.1 (yes it's
valid) to the top of the list, such that we receive:
# Generated by resolvconf
domain bbrouter
nameserver 127.3.2.1
nameserver 8.8.8.8
nameserver 8.8.4.4
nameserver 1.1.1.1
However, it seemed that no matter what I set `name_servers` to be, I would
receive:
# Generated by resolvconf
domain bbrouter
nameserver 127.3.2.1
The documentation proved hopeless. After 20 minutes of trying, I read the
script itself (`vim `which resolvconf``), and came across a group of lines
which mystified me:
for l in $local_nameservers; do
case "$stripped_line" in
$l)
islocal=true
break
;;
esac
done
So...if the nameserver matches 127.*, this causes no other nameservers to be
added after!! This is seemingly documented nowhere. The resolvconf.conf
manpage does not mention this "feature". Neither does the resolvconf manpage.
resolvconf.conf(5): LIBC_OPTIONS
resolv_conf_local_only
If a local name server is configured then the default is just to
specify that and ignore all other entries as they will be
configured for the local name server. Set this to NO to also
list non-local nameservers. This will give you working DNS even
if the local nameserver stops functioning at the expense of
duplicated server queries.
With the actual script contents in mind, this solves the problem:
local_nameservers=""
prepend_nameservers="127.3.2.1"
I do not understand why fallback nameservers are ignored when a local
nameserver is on the list, or why by default 127.* is a showstopper. I assume
you have good reasons for this. This behavior however should be documented.
Please consider documenting this side effect of local_nameservers.
Hopefully the snippet I posted from the man page is sufficent
documentation for you and explains why it's the default.
If not, please consider submitting a patch for the man pages.
Roy
Archive administrator: postmaster@marples.name