[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [Libevent-users] Re: [PATCH]: libevent/dns DNS_ERR_NOANSWERS
On Wed, Aug 10, 2011 at 04:56:27PM +0400, Leonid Evdokimov wrote:
> + } else if (reply && !reply->have_answer) {
> + error = DNS_ERR_NOANSWER;
> + } else {
> + error = DNS_ERR_UNKNOWN;
> }
There is an odd edge-case in dns. DNS_ERR_NOANSWER isn't actually a
great name.
Take the following example:
blah.blah.com exists as a TXT record, but not an IN A
If you query for IN A blah.blah.com, an RFC compliant server will return
a status of NOERROR without any records; because blah.blah.com exists,
just not IN A. There was an answer; a vaild answer.
I would say there should be another check here where the above situation
is checked for appropriately.
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users in the body.