Resolver Issues (non valid hostname characters)
Terry Lambert
tlambert2 at mindspring.com
Wed Mar 26 22:18:44 PST 2003
David J Duchscher wrote:
> > I would like to see a program, with source code, that can
> > determine, with 100% accuracy, whether or not "_" is allowed,
> > and prints out either:
> >
> > This system supports _, in violation of RFC-952.
> >
> > Or:
> >
> > This system complies with RFC-952.
> >
> > Then I would like to see the output of this program run on the
> > systems, other than Linux, which you claim violate RFC-952. You
> > can include Linux, if you want, to, for comparison purposes.
>
> Since I don't believe I can create such a program to your specification,
> I guess you win. All I can say is that gethostbyname will return host
> names with underscore character on the those operating systems.
I think you can. You can write a program which looks up the
IP of "demo_host" in some domain under your own control, in
which you have created the record for "demo_host" with an IP
address of 1.1.1.1.
Then you run the program, and it does a forward lookup on
the name, and prints the first message if it gets "1.1.1.1",
and prints the second if it gets and error.
I would do this for you, but since I believe all hosts I own
comply with RFC-952, I am unable to create the DNS record for
testing.
For bonus points, use a free IP address in your addres block,
instead of 1.1.1.1, and, if the lookup is successful, do a
reverse lookup, too, and make sure both gethostbyname() and
gethostbyaddr() work the way you say they work.
-- Terry
More information about the freebsd-stable
mailing list