-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Various updates to match authoritative behavior of BIND9 #22
base: master
Are you sure you want to change the base?
Conversation
A |
Thanks, I was putting "glue" in quotes for this reason, JJ used the term in the code to refer to data that belongs to the target of a CNAME (i.e. it is returned like the A records that get glued to an NS record) |
61775b3
to
cbc448c
Compare
LGTM EDIT: NVM, I found the Handshake fork. |
This makes sense as it applies to reflection / amplification attacks. If we are serving a root zone, we can always offer a SOA
This is nice! What's the status? |
Status: needs review. I've learned a lot more about DNS since I wrote this PR and probably need to make sure it all still makes sense. This branch is included in handout. |
Closes #5
Closes #21
Closes #16
Closes #15
A few edge cases aren't complete, indicated by
skip
in some of the tests.Test cases were designed to match results from adding the same record set to
named
and querying.Changes summary:
zone: only serve wildcard if there was otherwise no match
if
*.domain.
exists in the zone along withsub.domain.
, do not return the wildcard record as an answer fordomain.
orsub.domain
orsub.otherdomain.
zone: return CNAME records for any type requested
We should return this CNAME record whenever
sub.domain
is requested, no matter what the requested type is.zone: glue requested type, default A / AAAA
Assuming "glue" exists:
When
sub.domain.
is queried, the corresponding type should be returned as "glue" (it goes in the answer section though, not additional). We return A/AAAA records by default. In other words, the CNAME glue is treated like its own request, including adding SOA to authority section if no answer is available. Sosub.domain. TXT
would return the CNAME record along with the TXT record.zone: wildcard matches more than one label
This record should be matched against
sub.domain. TXT
but alsofoo.bar.sub.domain. TXT
.zone: filter out wildcards that do not match
This record should NOT be returned for a query for
another.domain.
because it does not match.zone: add SOA if authoritative but no answers. Applies to CNAME glue
Always sets the
aa
flag if we have a corresponding SOA in the zone, even if we don't include an actual SOA record (which we usually don't if an answer is present). This will also apply to "glue" from CNAME matches:(results from
named
)Record matching requested type present for target of CNAME:
Record matching requested type NOT present for target of CNAME:
zone: no-authority no-records answer should be as quiet as possible
Match behavior from
named
if the request is totally wrong for our zone (unless we are root)zone: add zsk property and enable ad-hoc signing
Self-explanatory. Enables loading a ZSK into the AuthServer to sign wildcard records upon request.