"Local DNS" option is for uDHCPd, not for DNSMasq

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Author Message
modervador
DD-WRT User


Joined: 07 Sep 2009
Posts: 270

PostPosted: Sun Mar 25, 2012 18:47    Post subject: "Local DNS" option is for uDHCPd, not for DNSMasq Reply with quote
Good people of the forum, please consider this. It seems there is some confusion between options

Setup : Basic Setup : Network Address Server Settings (DHCP) : "Use DNSMasq for DNS" (checkbox)
Services : Services : DNSMasq : "Local DNS" (enable/disable radio buttons)

Of those two, I believe that "Use DNSMasq for DNS" is the only one relevant to DNSMasq, i.e., the "Local DNS" option does nothing for DNSMasq. On my routers (build 15230 mini), I have looked at /tmp/dnsmasq.conf and /tmp/resolv.dnsmasq, and I see no change in these files when changing the "Local DNS" option. I think I've tracked down the source of this. The nvram variable in question here is "dns_local", as can be seen in

http://svn.dd-wrt.com/browser/src/router/udhcpd/config/dhcpd.webservices which is loaded by Services.asp.

Now look in

http://svn.dd-wrt.com/browser/src/router/services/services/udhcpd.c
http://svn.dd-wrt.com/browser/src/router/services/services/dnsmasq.c

and see that dns_local is used by uDHCPd but completely ignored by DNSMasq. Therefore, the "Local DNS" option is for uDHCPd and not DNSMasq.

Well, this is kind of funny, because if DNSMasq is disabled by these chechboxes/buttons,

Setup : Basic Setup : Network Address Server Settings (DHCP) : "Use DNSMasq for DHCP" (checkbox)
Setup : Basic Setup : Network Address Server Settings (DHCP) : "Use DNSMasq for DNS" (checkbox)
Services : Services : DNSMasq : "DNSMasq" (enable/disable radio buttons)

then the WebUI hides the "Local DNS" option at the only time that it is relevant, which is when uDHCPd must handle DNS. The code in udhcpd.c seems to show that uDHCPd does not load if "Use DNSMasq for DHCP" is checked, so there is no way to use DNSMasq for DHCP and use uDHCPd for DNS (not that you would want to do that).

As a first step to minimise this confusion, I believe the "Local DNS" option should be removed from the "DNSMasq" fieldset box on the Services page. Instead, it should show "Local DNS" and "Additional DHCPd Options" in a separate fieldset with the legend "uDHCPd", in the same way "DNSMasq Enable/Disable", "No DNS Rebind" and "Additional DNSMasq Options" are in a fieldset with the legend "DNSMasq".

Comments?

(In case you're looking for it, int dns_to_resolv(void) is found in http://svn.dd-wrt.com/browser/src/router/libutils/bcmutils.c )
Sponsor
SmartGeek
DD-WRT Novice


Joined: 08 Apr 2012
Posts: 1

PostPosted: Sun Apr 08, 2012 20:19    Post subject: thank you Reply with quote
thank you for your information. And I agree, this is very confusing.

It doesn't help that the dd-wrt documentation says to click on Local DNS when setting up DNSMasq.

http://www.dd-wrt.com/wiki/index.php/DNSMasq_as_DHCP_server
PushedChip649
DD-WRT Novice


Joined: 26 Dec 2012
Posts: 15

PostPosted: Sat May 02, 2015 19:23    Post subject: Reply with quote
Thank you very much for clearing this up modervador. I had played around with the dnsmask options for "local dns" settings a while back.

I few days ago when I came to try and connect to a local NAS querying by name my local DNS couldn't find it anymore until you clearly explained this.

Thanks a million
ghoffman
DD-WRT User


Joined: 03 Jan 2010
Posts: 453

PostPosted: Sun May 03, 2015 12:21    Post subject: Reply with quote
i hope this i addressed. I have tried to use udhcpd instead of dnsmasq, partly because the dhcp lease times are then usefully displayed in the gui. the other option would be for the devs to fix the dnsmasq lease time display. these are old issues that seem to have been dropped; the solutions are apparently not complex and a little code cleanup could solve years of frustions.

does anyone have influence of knowledge about how to get these changes implemented?
wirerydr
DD-WRT Novice


Joined: 30 Nov 2013
Posts: 26

PostPosted: Mon May 04, 2015 5:06    Post subject: Reply with quote
ghoffman wrote:
i hope this i addressed. I have tried to use udhcpd instead of dnsmasq, partly because the dhcp lease times are then usefully displayed in the gui. the other option would be for the devs to fix the dnsmasq lease time display. these are old issues that seem to have been dropped; the solutions are apparently not complex and a little code cleanup could solve years of frustions.

does anyone have influence of knowledge about how to get these changes implemented?


Normally one would register on the Trac system for DD-WRT, and then raise a change-ticket there. However registrations currently appear to be disabled. The next best approach might be to find someone with existing Trac access and ask them to raise the ticket. To be perfectly honest though, I'm not sure how much time/effort the devs are devoting to raised tickets these days. I could be wrong but it almost seems as if they're following some sort of internalized priority list and providing very little visible responsiveness to what's being raised in the forums and Trac.

_________________
Ubiquiti EdgeRouter Lite | Primary router
D-Link dgs-1100-08 smartswitch | Main VLAN-aware switch
Netgear R7000 #1 | Primary AP
Netgear R7000 #2 | AC-only client-bridge (office)
Asus RT-AC66U | AC-only client-bridge (HTPC)
Netgear WNDR3700v2 | client-bridge (basement)
ghoffman
DD-WRT User


Joined: 03 Jan 2010
Posts: 453

PostPosted: Mon May 04, 2015 9:56    Post subject: Reply with quote
Quote:
Normally one would register on the Trac system for DD-WRT, and then raise a change-ticket there.

these were raised in 2012 as i recall. i understand that it is a huge job keeping this project on course. i will try again 'sometime'.
BobLoblaw1122
DD-WRT Novice


Joined: 26 Jun 2014
Posts: 36

PostPosted: Sat Jun 20, 2015 16:04    Post subject: Reply with quote
BrainSlayer stated that the "Local DNS" does have an effect with DNSMasq:

http://svn.dd-wrt.com/ticket/4701
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum