Re: howto know if a query was delegated to cache

2011-07-26 Thread harish badrinath
Hello, I have posted a "patch" at https://lists.isc.org/pipermail/bind-workers/2011-July/003061.html. It might be a hack but it does the job and passed some simple tests that i did to verify the functionality that i wanted. The patch is against BIND 9.7.1-P2 Regards, Harish _

Re: howto know if a query was delegated to cache

2011-07-26 Thread Chris Buxton
On Jul 25, 2011, at 5:33 AM, Feng He wrote: > There is a "rr" flag in the response which indicates the answer is not > from a cache. There is no 'rr' flag. Perhaps you mean one of the following: - 'aa' means that the server queried is authoritative for the answer. Not applicable to the OP's c

Re: howto know if a query was delegated to cache

2011-07-26 Thread harish badrinath
> Whatever you're trying to accomplish, it's would not appear to be consistent > with the founding RFCs for DNS: I am not trying to modify when/how/which "upstream name server" is contacted, i am not invalidating cached data at my will. I am not trying to modify requests/responses. Basically i am

Re: howto know if a query was delegated to cache

2011-07-26 Thread Mark Andrews
To answer the original question. There isn't a flag for the query or the client as answers are made up of data from multiple sources. 'is_zone' is set to ISC_TRUE or ISC_FALSE depend apon whether the current db is a zone data base or not. "aa" is only applicable to the first rrset in a DNAME/CN

Re: howto know if a query was delegated to cache

2011-07-25 Thread Kevin Darcy
On 7/25/2011 6:14 AM, harish badrinath wrote: (Originally sent to bind-workers, sorry if this is considered cross posting. Slightly modified from the original message) Hello, I am using Bind version:BIND 9.7.1-P2 I am doing some small internal changes to bind and i have to know when a query i

Re: howto know if a query was delegated to cache

2011-07-25 Thread harish badrinath
> Have you seen the flags? the first has an "aa" flag set, while the > second doesn't have. Instead it has a "ra" flag set. Sorry for my > before post to write wrong with "rr" flag. Sorry for the confusion, I was talking about internal cache (db) instead of public recursive servers/authoritative se

Re: howto know if a query was delegated to cache

2011-07-25 Thread Feng He
You may have been confused about what should be cached and what should not be cached. This is an answer which is coming from the authoritative server and which is not a cached response: $ dig www.google.com @ns1.google.com ; <<>> DiG 9.6-ESV-R4 <<>> www.google.com @ns1.google.com ;; global opti

Re: howto know if a query was delegated to cache

2011-07-25 Thread harish badrinath
Hello, On Mon, Jul 25, 2011 at 6:03 PM, Feng He wrote: > There is a "rr" flag in the response which indicates the answer is not > from a cache. Could you please elaborate. Is the flag passed to the client ?? Attached are two calls to bind, to resolve www.google.com I have use the command dig www

Re: howto know if a query was delegated to cache

2011-07-25 Thread Feng He
There is a "rr" flag in the response which indicates the answer is not from a cache. On Mon, Jul 25, 2011 at 6:14 PM, harish badrinath wrote: > (Originally sent to bind-workers, sorry if this is considered cross > posting. Slightly modified from the original message) > > Hello, > > I am using Bi