[Bug 296305] local unbound not starting up, dhclient interaction

[email protected]
Newsgroups gmane.os.freebsd.bugs
Message-ID <[email protected]/bugzilla/>
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=296305

--- Comment #1 from Magus <[email protected]> ---
Hello,

I’ve found a bug which prevents local unbound service from starting up, which
causes DNS resolution to not work on the affected machine (set-up to use
local_unbound as domain name resolver).
For this bug to happen the machine has to be configured to get its IP address
from DHCP and it depends on the specific reply from DHCP server.

When DHCP server responds with a lease that contains option “domain-name” and
that option has value starting with a dot (for example “.home” which was set by
default on my home router btw) it causes the following error when booting up
the machine:
…
Starting local_unbound.
Waiting for nameserver to start...[1782511114] unbound-control[14551:0] error:
connect: Connection refused for /var/run/local_unbound.ctl
. [17825111161 unbound-control[16495:0] error: connect: Connection refused for
/var/run/local_unbound.ctl
. [1782511118] unbound-control[18159:01 error: connect: Connection refused for
/var/run/local_unbound.ctl
. [1782511120] unbound-controll20138:01 error: connect: Connection refused for
/var/run/local_unbound.ctl
. [17825111221 unbound-control[21508:01 error: connect: Connection refused for
/var/run/local_unbound.ctl
giving up
protect: option requires an argument -- p
usage: protect [-i] command
protect [-cdi] -g pgrp | -p pid

——
When booting up this invalid value of domain-name (like “.home” in my example)
is then automatically added as a forward-zone in /var/unbound/forward.conf (by
resolvconf).

Migitation:
Add the following line to /etc/dhclient.conf
ignore domain-name;

Suggested solution:
Ignore invalid domain-name starting with anything else than a letter or a
number.
Either ignore on first stage by dhclient so it doesn’t even show in dhcp.lease
and it doesn’t “contaminate” /var/unbound/forward.conf or ignore on second
stage by local_unbound service so its startup isn’t disrupted by invalid
domain-name.

Regards,
Magus

-- 
You are receiving this mail because:
You are the assignee for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.