Don Hackett: [BIND-BUGS #1090] [bind bug] leading zero's give bad address

Paul A Vixie vixie at mibh.net
Tue Sep 5 20:27:02 UTC 2000


> 	Is there any way to make this an option that can be set in either 
> the resolver or in the nameserver?  That way people needing/wanting 
> one type of behaviour or the other can get it, while not necessarily 
> breaking things for everyone else?

inet_aton() is not part of the resolver.  it's part of libc, more or less.
right now it is "pure", i.e., no static state or config or returned variables.
it has to remain "pure" which means that to make this a runtime option i'd
need to do a getenv() on every single call.  or i could make it a compile time
option with the result that approximately half the users of any given system
would still hate me.

the right way to do this is to make an inet_aton10() with the decimal behaviour
and let the callers of inet_aton*() make the decision.  then we could, in the
resolver, look at the stateful options (settable either in resolv.conf or in
the RES_OPTIONS environment variable).  so, gethostbyname()'s hostent-faking
machinery, which is what rlogin and many other command line consumers are
using as their path into inet_aton(), would do what you're suggesting.

> 	If it helps reduce the number of complaints received from 
> Microsoft-on-the-brain people who automatically assume that the 
> Universe was created when Bill Gates was born, then I'm all for it.
> 
> 	Of course, this would also mean yet another piece of cruft that 
> creeps into the code, and which the BINDv9 folks are going to have to 
> find some way to deal with in the future.

not only bindv9 but glibc and the various *BSD's who roll their own 
gethostbyname().  this is not a small undertaking.  all the world's not
only not a vax, but it doesn't run raw BSD or BIND, either.



More information about the bind-workers mailing list