Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 455502 - sys-libs/glibc - system resolver uses only three DNS-servers max, although it is possible to specify more DNS-servers in /etc/resolv.conf
Summary: sys-libs/glibc - system resolver uses only three DNS-servers max, although it...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Low normal
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-04 20:48 UTC by Dmitry
Modified: 2013-02-08 05:56 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry 2013-02-04 20:48:12 UTC
system resolver uses only three DNS-servers max, although it is possible to specify more DNS-servers in /etc/resolv.conf

it is possible to fix this behaviour very fast.
due to documentation
man resolv.conf (quote):
> ..................
>
> Up to MAXNS (currently 3, see  <resolv.h>)  name 
> servers  may be listed,  one per keyword.
> ..................
> 

we should just change the value in the line 
# define MAXNS                  3       /* max # name servers we'll track */
in /usr/include/resolv.h file

I suggest to set up seven at least. Because right now I have the situation, when I need to specify five DNS-servers on my customers' machines.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2013-02-05 12:33:44 UTC
Alternatively you could run a simple DNS server on the loopback device, or on a nearby system, one that supports as many servers as you like, and simply point your resolv.conf there. Otherwise, you should probably direct your request upstream.
Comment 2 Dmitry 2013-02-07 05:08:49 UTC
> Alternatively you could run a simple DNS server on
> the loopback device, or on a nearby system, one that
> supports as many servers as you like, and simply
> point your resolv.conf there.
> 

well, I am not always the real administrator of the customer machine. Sometimes all I can do - give some settings to my customer's machine through my DHCP-server.

> Otherwise, you should probably direct your request upstream.
> 

OK, next week I'll recompile glibc with maxns=9, check, if there are some unknown issues, and after that, if everything is OK, I'll try to post a message to the official glibc bugzilla. As I see, MS Windows can easily use up to 32 (according to documentation) DNS-servers.
Comment 3 SpanKY gentoo-dev 2013-02-08 05:56:54 UTC
(In reply to comment #2)

if you aren't the admin on the system, then it's not like you can install an updated glibc which can support more servers either.

on your router, you can install something like dnsmasq which (afaik) can handle many more servers.  then point all your clients to that machine.  it'll prob be better anyways as it'll act as a local cache for all the systems.

if you really want to update MAXNS, then you can use /etc/portage/patches/ to locally increase it.