Bind code question

Mark.Andrews at nominum.com Mark.Andrews at nominum.com
Fri Feb 16 00:40:39 UTC 2001


	Your most probably seeing anti-cache poisoning code at work.
	Only part of the response will be cached.

	Mark

> I'm having difficulty understanding a couple of things in the BIND
> implementation (I'm working with 8.2.3).
> 
> When a query with the response bit set comes into the function ns_resp(),
> I can follow it up until it calls nslookup() to grab the address for each
> NS in nsp (list of databuf structs). This occurs when the response doesn't
> contain the answer and the iterative process is about to start.
> 
> Adding some additional debugging output, I've noticed that the return value
> for the nslookup() call in ns_resp() is 0 quite often, indicating no addresse
> s
> could be found for any of the nameservers. This shuttles us to the timeout
> label and pulls the query off the allocated queries queue.
> 
> Nslookup() is calling sysquery(), which I understand if no glue records were
> returned with the response. As the comments in the code mention, a zero retur
> n
> value can indicate a sysquery() timeout or simply a response w/ no glue.
> However, in nearly all my test cases doing a dump of the actual records
> returned by nslookup (the userland command) showed that the servers were
> indeed returning the necessary glue A records, however, this timeout conditio
> n
> still appears during normal named operation (I'm flushing the cache, etc, 
> between all this).
> 
> What's going on here? If the glue is being returned properly, is there some
> reason I'm overlooking why the code would still need to do a sysquery()? Is i
> t
> indicative of some different error altogether? After a timeout and the query
> gets popped off, does Bind just hope the response eventually comes back, gets
> cached, and will be available when the user program requests the same data
> again?
> 
> Many thanks in advance for any help....
> 
> -- 
> ********************************
> Joe Hooper | hooper at isolated.org
> ********************************
> 
--
Mark Andrews, Nominum Inc.
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742                 INTERNET: Mark.Andrews at nominum.com


More information about the bind-users mailing list