Opened 12 years ago

Closed 12 years ago

#518 closed defect (fixed)

openwrt host does not use dnsmasq cache for its own purposes

Reported by: Mark Mentovai <mark@…> Owned by: developers
Priority: normal Milestone: 0.9/rc6
Component: base system Version:
Keywords: Cc:


DNS lookups on the host running openwrt do not take advantage of the dnsmasq cache if such a cache is available. should be used as the nameserver in /etc/resolv.conf if a nameserver such as the dnsmasq cache is running on the local host. This is standard operating procedure when a caching nameserver is running on the local host.

I have a patch that I've been quietly maintaining and using for about a year that achieves this by populating resolv.conf.client with nameservers as is currently done with resolv.conf, for both dhcp-configured and statically-configured networks. At boot time, a symbolic link is made from resolv.conf to resolv.conf.client. When dnsmasq starts up, that symbolic link is replaced with a resolv.conf file that specifies as the local nameserver. Loop avoidance is handled by configuring dnsmasq (in dnsmasq.conf) to obtain the addresses of nameservers to forward queries to from resolv.conf.client.

Attachments (1)

518.resolv.conf.client.patch (3.6 KB) - added by Mark Mentovai <mark at moxienet dot com> 12 years ago.

Download all attachments as: .zip

Change History (4)

Changed 12 years ago by Mark Mentovai <mark at moxienet dot com>


comment:1 Changed 12 years ago by Kheru

What about dont using resolv.conf at all?

from uClibc's Changelog.full:5285

" Do not fail all lookups when /etc/resolv.conf is missing, as i.e. "
" checking on is still valid w/o resolv.conf "
" -Erik "

So, if resolv.conf dont exist all dns-lookups will be sent to (local dns server, thus dnsmasq).

comment:2 Changed 12 years ago by mbm

  • Milestone set to 1.0-rc6

comment:3 Changed 12 years ago by florian

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in [4282]

Add Comment

Modify Ticket

as closed .
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.