Allow underscores in DNS names

Louis A. Mamakos louie at TransSys.COM
Sat Mar 29 18:06:04 PST 2003


> Dag-Erling Smørgrav wrote:
> > The attached patch, inspired by a discussion on -STABLE, modifies our
> > resolver library to allow underscores in host names, by classifying
> > the underscore as a hyphen character.  Even though RFC952 forbids
> > them, underscores are becoming increasingly common in DNS, and they
> > are sometimes used for mechanisms (such as Microsoft's automatic proxy
> > configuration scheme) which we might want to support in FreeBSD.
> 
> 
> There was a better patch that made it an option in resolv.conf,
> rather than turning it on all the time.

This is great, except that you'd don't need to have a resolv.conf
on your system at all; the resolver will default to using a local
caching nameserver.

> FreeBSD should be standards compliant, by default, and take work
> to make it possible to give bogus data to other hosts on the
> Internet who can not handle "_" or other characters because they
> *are* standars compliant.

Since this is a resolver option, you're not handing out names to
other hosts using the DNS infrastructure.

> "Be conservative in what you send."

And liberal in what you receive, which is exactly what modifing
the resolver to not cause gethostbyname() and it's ilk to barf
on these types of names.

There are lots of things in ancient RFCs which probably do not
make as much sense these days as they once did.  If there is a
security issue in applications, they should get fixed regardless.
All this heartburn over what the gethostbyname() library function
chooses to believe from the DNS still doesn't address getting
hostnames out of NIS or /etc/hosts.

louie


More information about the freebsd-arch mailing list