Use experimental "_ A" minimization in relaxed mode.

qname minimization, even in relaxed mode, can fail on
some very broken domains. In relaxed mode, instead of
asking for "foo.bar NS" ask for "_.foo.bar A" to either
get a delegation or NXDOMAIN. It will require more queries
than regular mode for proper NXDOMAINs.
This commit is contained in:
Witold Kręcicki
2019-05-28 14:03:13 +02:00
committed by Evan Hunt
parent 2691e729f0
commit ae52c2117e
6 changed files with 136 additions and 35 deletions

View File

@@ -98,7 +98,7 @@ def create_response(msg):
r.set_rcode(NXDOMAIN)
if ugly:
r.set_rcode(FORMERR)
elif "zoop.boing.".endswith(lqname):
elif lqname.endswith("zoop.boing."):
r.authority.append(dns.rrset.from_text("zoop.boing." + suffix, 1, IN, SOA, "ns3." + suffix + " hostmaster.arpa. 2018050100 1 1 1 1"))
r.set_rcode(NXDOMAIN)
else: