udns returns DNS_E_NXDOMAIN when domain exists but SRV records does not exist

mjt at corpit.ru mjt at corpit.ru
Tue Jun 21 15:49:21 MSD 2011


21.06.2011 15:38, Iñaki Baz Castillo wrote:
> 2011/6/21  <mjt at corpit.ru>:
>>> It's not an error in udns. I've captured DNS traces and indeed, even
>>> Google DNS replies "0011 = Reply code: No such name (3)". So, is it a
>>> bug in DNS protocol? :)
>>
>> I think it's a bug in your expectations.  SRV records were invented
>> long after DNS appeared, and SRV uses existing DNS infrastructure
>> unchanged.  How to interpret the result is a question for the app
>> that uses SRV records.
> 
> Yes, but if a DNS server implements SRV, what does prevent it to reply
> "NODATA" instead of "NXDOMAIN" (in case the *domain* does exist)?
> The queried domain is specified in the SRV query (i.e:
> "_sip._udp.lalala.somedomain.org" means that queried service is "sip",
> protocol "udp" and domain "lalala.somedomain.org"). So a DNS
> authoritative for lalala.somedomain.org should be able to reply
> "NXDOMAIN" rather than "NXDOMAIN". I see no reason, neither
> limitation, for replying "NXDOMAIN".

There are at least 2 reasons: compatibility (so that all
implementations returns the predictable results), and correctness
from DNS standpoint.

Besides, this has absolutely nothing to do with udns which is a
resolver library, not a nameserver.

/mjt


More information about the udns mailing list