[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [Libevent-users] [PATCH] disclose TTL for negative answers



On Thu, Sep 1, 2011 at 4:57 AM, Leonid Evdokimov <leon@xxxxxxxxxxxx> wrote:
> RFC 2308 says a lot about negative answer caching.
>
> Here is patch, that discloses TTL of negative answer (if possible) to
> the library user.
>

Hi, Leonid! One concern:

When you say
+       if ((flags & 0x020f) && (flags & 0x020f) != DNS_ERR_NOTEXIST) {
+               /* there was an error and it's not NXDOMAIN */

I don't see how (flags & 0x020f) != DNS_ERR_NOTEXIST could ever be
false.  DNS_ERR_NOTEXIST is 3, and (flags & 0x020f) is either 0x020f
or 0.

Am I missing something, or did you mean to check something else here?

yrs,
-- 
Nick
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.