[getdns-users] Strange behavior with query ordering

Rose, Scott W. scott.rose at nist.gov
Tue Jun 16 16:20:17 UTC 2015


We're seeing some strange behavior in python depending on the order of queries.  This code:

import getdns
extensions = {"dnssec_return_validation_chain" : getdns.EXTENSION_TRUE}
ctx = getdns.Context()

hostname = "_443._tcp.301ss.tlsa.good.test.had-pilot.biz"
for request_type in [getdns.RRTYPE_A,getdns.RRTYPE_TLSA]:
    print "hostname=",hostname,"request_type=",request_type,"extensions=",extensions
    results = ctx.general(name=hostname,request_type=request_type,extensions=extensions)
    for reply in results.replies_tree:
        for a in reply['answer']:
            if a['type'] == request_type:
                print a


Works, but if we change it to remove the A query, it doesn't:

import getdns
extensions = {"dnssec_return_validation_chain" : getdns.EXTENSION_TRUE}
ctx = getdns.Context()

hostname = "_443._tcp.301ss.tlsa.good.test.had-pilot.biz"
for request_type in [getdns.RRTYPE_TLSA]:
    print "hostname=",hostname,"request_type=",request_type,"extensions=",extensions
    results = ctx.general(name=hostname,request_type=request_type,extensions=extensions)
    for reply in results.replies_tree:
        for a in reply['answer']:
            if a['type'] == request_type:
                print a

This doesn't return the result ('a').  This isn't for all names either (_443._tcp.www.had-pilot.com works).  The name above does contain empty non-terminals (the "tlsa.good.test" are all ENT's).  Could that be it?  It seems to work if you query for qtype=A first, then TLSA, but not just TLSA.  

Scott
 
===================================
Scott Rose
NIST
scott.rose at nist.gov
+1 301-975-8439
Google Voice: +1 571-249-3671
http://www.dnsops.gov/
https://www.had-pilot.com/
===================================





More information about the Users mailing list