Project

General

Profile

Bug #9963

DNS servers assigned dynamically are omitted if also assigned manually when override is disallowed

Added by Jim Pingle 3 months ago. Updated 2 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
DNS Resolver
Target version:
Start date:
12/10/2019
Due date:
% Done:

100%

Estimated time:
Affected Version:
All
Affected Architecture:
All

Description

If:

  • A name server is manually configured, such as 8.8.8.8, under System > General
  • That same name server is also assigned dynamically (DHCP, PPPoE, etc)
  • And DNS Server Override is unchecked

Then that name server is incorrectly omitted from the system name servers.

It looks like the code is trying to avoid duplication, but didn't account for this case.

Associated revisions

Revision f829d7e2 (diff)
Added by Jim Pingle 3 months ago

Don't dedup DNS from dyn sources if override is disabled. Fixes #9963

Revision 9998e8d7 (diff)
Added by Jim Pingle 3 months ago

Don't dedup DNS from dyn sources if override is disabled. Fixes #9963

(cherry picked from commit f829d7e2967d170f09756937e9076e87d5f9e2d7)

History

#1 Updated by Jim Pingle 3 months ago

This seems to primarily be a problem just after unchecking the DNS Server Override box, as later the servers are prevented from being in the list originally. So there is somewhat of a race condition at play.

#2 Updated by Jim Pingle 3 months ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100

#3 Updated by Jim Pingle 3 months ago

  • Target version changed from 2.5.0 to 2.4.5

#4 Updated by Jim Pingle 3 months ago

Easiest way to reproduce:

  • Enable forwarding in the DNS Resolver (Or forwarder, behavior is likely the same but I only checked resolver)
  • Check DNS Server Override on System > General, save, then reboot or at least save/apply WAN)
  • Set a DNS server on System > General that is the same as one supplied via DHCP on WAN, save
  • Check that it's in /var/unbound/unbound.conf as a forward-addr entry
  • Check DNS Server Override on System > General, save, and check /var/unbound/unbound.conf and see if the manually added entry is a forward-addr

Without this change, the DNS server will be missing from the list (and if they all overlap, there will be no forwarders and resolving will fail). With this change, it should be a forward-addr either way.

#5 Updated by Jim Pingle 2 months ago

  • Status changed from Feedback to Resolved

Works as expected on 2.4.5.a.20191219.0146

Also available in: Atom PDF