Project

General

Profile

Bug #4022

Unbound doesn't set 127.0.0.1 in resolv.conf

Added by Chris Buechler over 3 years ago. Updated over 3 years ago.

Status:
Resolved
Priority:
Normal
Category:
DNS Resolver
Target version:
Start date:
11/17/2014
Due date:
% Done:

100%

Affected Version:
2.2
Affected Architecture:

Description

127.0.0.1 should be first in resolv.conf where unbound is enabled and bound to localhost. line 145 in system.inc. There's an issue with the logic there.

This also needs an additional check - if dnsmasq/unbound aren't listening on port 53, skip adding 127.0.0.1 to resolv.conf to avoid the same breakage that used to happen when not bound to localhost.

Associated revisions

Revision 97383d2b
Added by Chris Buechler over 3 years ago

don't blow away previous contents of this variable. fixes #4022

Revision 355c2f8b
Added by Chris Buechler over 3 years ago

also check port of dnsmasq/unbound and skip 127.0.0.1 in resolv.conf if
not port 53. Ticket #4022

History

#1 Updated by Chris Buechler over 3 years ago

  • Status changed from New to Confirmed

#2 Updated by Renato Botelho over 3 years ago

  • Status changed from Confirmed to Feedback
  • Assignee set to Chris Buechler

The logic there looks correct, and on my tests it added 127.0.0.1 as the first nameserver in resolv.conf when unbound is enabled and configured to bind localhost or all. Do you have a broken system where I can take a look?

#3 Updated by Chris Buechler over 3 years ago

I was wrong on the line where the problem existed. That's fixed now. I also fixed it to ensure it's only in there if the port is 53.

#4 Updated by Chris Buechler over 3 years ago

  • % Done changed from 0 to 100

#5 Updated by Chris Buechler over 3 years ago

  • Status changed from Feedback to Resolved

confirmed good

Also available in: Atom PDF