Description
For example, given a cache like:
{Integer@2917} 1 -> {Cache@2918} "{ _dmarc.pa.gov. 86337 IN CNAME [pa.gov.hosted.dmarc-report.com.] } cl = 3
{ pa.gov.hosted.dmarc-report.com. 237 IN TXT ["v=DMARC1; p=quarantine; sp=quarantine; rua=mailto:f8debbc3@mxtoolbox.dmarc-report.com; ruf=mailto:f8debbc3@forensics.dmarc-report.com; fo=0"] } cl = 3
And a call like this with a LookupSession from the default builder (which has a Cache):
lookupSession.lookupAsync(Name.fromString("_dmarc.pa.gov."), Type.TXT)
...
When it hits lookupWithRecords here:
dnsjava/src/main/java/org/xbill/DNS/lookup/LookupSession.java
Lines 470 to 475 in 6204b0e
c.lookupRecords
finds the entry, but setResponseToMessageFuture
converts it to null, because the response wasn't 'successful' as per this:
dnsjava/src/main/java/org/xbill/DNS/lookup/LookupSession.java
Lines 495 to 513 in 6204b0e
I've tried this with a handful of CNAMEs and they all seem to fail regardless of TTL.
Honestly, I'm fuzzy on how caching in the DNS spec works with CNAMEs, so maybe this is working as intended. It seems like maybe the native JVM dns resolver work similarly (still investigating that, but just based on how long subsequent queries take it might not be?).