How to get the systemd resolver to resolve local (i.e. unqalified) names?

Chris Green cl at isbd.net
Sun Jun 4 14:22:21 UTC 2017


On Sun, Jun 04, 2017 at 04:03:17PM +0200, Xen wrote:
> Tom H schreef op 04-06-2017 15:56:
> > On Sun, Jun 4, 2017 at 8:10 AM, Xen <list at xenhideout.nl> wrote:
> > > Tom H schreef op 04-06-2017 13:43:
> > > > 
> > > > There's bug somewhere. I'm surprised that setting a search domain in
> > > > resolved's config doesn't result in a domain or search entry in
> > > > resolv.conf. It shouldn't be necessary but it looks like it is.
> > > 
> > > Aye, the DNS resolution is supposed to need the search directive,
> > > 
> > > but I guess the resolve resolutin is supposed not to depend on that.
> > 
> > resolved has a "Domain=" directive so, even if it doesn't depend on
> > it, it should respect that setting - and it isn't.
> > 
> > So this is the main "bug" along with the fact that systemd-resolve and
> > getent (when the latter uses the "resolve" NSS module) don't need a
> > domain or search entry in "/etc/resolv.conf".
> 
> The problem is that if systemd-resolved wants to conform to the proper
> format of /etc/resolv.conf, it OUGHT to fail here.
> 
> The bug is in the generation of /etc/resolv.conf, not in systemd.
> 
> A utility like "host" uses /etc/resolv.conf directly, and thus naturally
> should also depend on the search directive.
> 
> Systemd-resolved in this case functions correctly.
> 
> On a non-systemd system, the same would have happened.
> 
In practice it doesn't though, my 16.04 systems work OK, 'host xxxx'
works where xxxx is an unqualified name.

-- 
Chris Green




More information about the ubuntu-users mailing list