openresolv-discuss

Possible documentation bug in openresolv

Fred Brennan

Tue Sep 17 10:01:59 2019

Greetings,

I apologize if this has been discussed before; there is no way to check as the 
archives are down.

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.

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.

All the best,
Fred Brennan




Follow-Ups:
Re: Possible documentation bug in openresolvRoy Marples
Archive administrator: postmaster@marples.name