2

Is there a way to increase the resolv.conf search suffix limitation beyond six domains and 256 characters? This is an issue for an environment that has well over six domains to consider.

I realize that having more suffixes will delay resolution in many cases, but there are "timeout" and "attempts" parameters that could deal with this, I assume.

nice_line
  • 149
  • 2
  • 7
  • Are those domains disjunctive? Usually one would make one domain the master of the others, and have that delegate sub-queries appropriately. – tink Jun 10 '13 at 22:33
  • For the most part yes. This is on a global network. – nice_line Jun 11 '13 at 05:02

2 Answers2

3

libc must be recompiled after redefining MAXDNSRCH and defdname in resolv.h in the package, and then re-packaged. Do not modify /usr/include/resolv.h, but rather resolv.h in the package which delivers it.

For example, if one is on an RPM-based operating system, one would download the .srpm, install it locally, modify the source code, re-archive it and rebuild the .srpm and .rpm packages, upload the .rpm into the Yellowdog Update Manager ("YUM") repository and mass-upgrade the libc package on all affected systems. The .srpm would, after regression testing, be committed into one's local source code repository and the changes documented in the commit log as well as the build release document. Although this example used RPM, this applies to all operating systems which support packages.

Anything less than this, and one is looking at a hack instead of doing clean system engineering.

UX-admin
  • 41
  • 2
1

Looking in to /usr/include/resolv.h, you will see the value is hardcoded:

# define MAXDNSRCH 6 /* max # domains in search path */

and

char defdname[256]; /* default domain (deprecated) */

So if you want to modify, you must re-complie resolv.h to make it changes, but I think it's not a good ideal.

cuonglm
  • 2,386
  • 2
  • 16
  • 20
  • Actually: you don't recompile headers; that header is part of libc. So they'd recompile their ** GNU C Library** - which, I agree, is not a good idea. – tink Jun 10 '13 at 22:31
  • Sorry for my poor English, but I think it's is the same. Could you recompile `GNU C Lib` without the header? – cuonglm Jun 11 '13 at 00:57
  • Thanks for the replies. Why would this be a bad idea? – nice_line Jun 11 '13 at 05:02
  • There are a couple suggestions here: http://flyingtux.blogspot.com/2009/07/maxns.html I think a named server for my use will be fine. This is for a management server that I run scripts from. It will speed up the queries tremendously in general, I think. – nice_line Jun 11 '13 at 05:09
  • @Gnouc: by your logic one could say one is driving fuel because a car won't run w/o it? :) – tink Jun 11 '13 at 22:38
  • If `defdname` is used to define the maximum length of `domain`, then changing that is a really bad idea. If a DNS query exceeds 255 characters (256 for the null terminating byte in memory), it violates RFC. – Andrew B Jun 16 '13 at 18:35