Unless I misunderstand what you mean, my version of BIND (8.2.2p3) doesn't do that.
$ host -a 2.254.92.204.in-addr.arpa 2.254.92.204.in-addr.arpa PTR most.weird.com 2.254.92.204.in-addr.arpa PTR mail.weird.com
Interesting. I actually haven't tried this since BIND 4. It made sense that it wouldn't so I assumed it shouldn't and further assumed that in BIND 8 that it didn't as well. (Sorry about that last sentence!) Anyways, I think you catch up with me in your next paragraph here ... So does the reverse resolve work correctly with the two PTR responses for most resolvers? Karyn
I don't think it round-robins them though (that's the order they appear in my zone file and several queries in a row always return them in that order -- I've not read the code recently so I don't remember for sure), because normally you don't want to round-robin them, and if you did you wouldn't be able to distinguish between the primary host and its aliases with the BIND resolver library:
$ host -a 204.92.254.2 Name: most.weird.com Address: 204.92.254.2 Aliases: mail.weird.com
(The "primary", or "official" hostname comes from the "h_name" field of "struct hostent", which is returned by gethostbyaddr() and friends.)
<< Yes, I know what kind of flack that this will lead to, but the logic isn't that wierd...
I can't give you any flack about multiple PTRs, I use them too! :-)
-- Greg A. Woods
+1 416 218-0098 VE3TCP <gwoods@acm.org> <robohack!woods> Planix, Inc. <woods@planix.com>; Secrets of the Weird <woods@weird.com>
[ On Monday, August 21, 2000 at 09:16:53 (-0700), Karyn Ulriksen wrote: ]
Subject: RE: lame delegations
Unless I misunderstand what you mean, my version of BIND (8.2.2p3) doesn't do that.
$ host -a 2.254.92.204.in-addr.arpa 2.254.92.204.in-addr.arpa PTR most.weird.com 2.254.92.204.in-addr.arpa PTR mail.weird.com
Interesting. I actually haven't tried this since BIND 4. It made sense that it wouldn't so I assumed it shouldn't and further assumed that in BIND 8 that it didn't as well. (Sorry about that last sentence!) Anyways, I think you catch up with me in your next paragraph here ...
I don't remember ever having trouble with multiple PTRs in later versions of BIND-4 either (I do remember that 4.9.7 in particular works OK....) I doubt I ever tried it on 4.8.3 though.....
So does the reverse resolve work correctly with the two PTR responses for most resolvers?
I found this tidbit in my archive of the bind-workers mailing list from back in June of 1996: As it stands, BIND allows an IP address to have multiple PTR records, but gethostbyaddr() only returns the first. and this "reply" to a proposal to "fix" this issue: have you looked at the 4.9.3 or 4.9.4 version of the res/gethnamadr.c file, paying special attention to the MULTI_PTRS_ARE_ALIASES preprocessor symbol and its default value? That setting is of course: #define MULTI_PTRS_ARE_ALIASES 1 /* XXX - experimental */ And according to my CVS repository that code's been in BIND's resolver since before 28-Sep-94, i.e. BIND-4.9.3-BETA-9 has it but it was not in 4.9.2-940221. I.e. Yes, most existing resolvers based on the BIND code will correctly return multiple PTRs in responses as aliases in the returned "struct hostent". I have no knowledge of the behaviour of any "third party" resolvers in this scenario though. Obviously it's not too hard for anyone with such a resolver, and a tool such as "host" or "nslookup" that can be linked against that resolver, to test it though.... -- Greg A. Woods +1 416 218-0098 VE3TCP <gwoods@acm.org> <robohack!woods> Planix, Inc. <woods@planix.com>; Secrets of the Weird <woods@weird.com>
participants (2)
-
Karyn Ulriksen
-
woods@weird.com