MSU-CS4360-JDNS / JDNSS

A leaf DNS server in Java
1 stars 1 forks source link

Not Correctly adding NS record to a MX Query with DNSSEC #44

Closed wwhitecar closed 6 years ago

cblanto7 commented 6 years ago

I think that could have something to do with the addRRSignature() method in Response.java

cblanto7 commented 6 years ago

after look it at if for a bit, I think the issue is within addAuthorities() specifically, if (!UDP || responses.length + authority.length < maximumPayload). I traced both values responses.length + authority.length = 748 maximumPayload = 512

so the authorites are not being added because it would exceed current maximum payload size.

So it seemed that we need to indicate truncation, so that we can repeat the query over TCP...

else if(responses.length + authority.length >= maximumPayload){
   header.setTC(true);
}