Adds specification of default query and response handling#1000
Conversation
|
@vlevigneron, do you have a comment on this PR? |
mattias-p
left a comment
There was a problem hiding this comment.
I really like this document!
The filename is misspelled. Also, maybe call it DNSQueryAndResponseDefaults.md?
matsduf
left a comment
There was a problem hiding this comment.
The document is renamed as suggested. Also the headline is changed accordingly.
|
@vlevigneron, could you review? |
|
@mattias-p, updated after our discussion. Please review again. |
|
@mattias-p, @vlevigneron, @PNAX and @tgreenx, please review this. |
ghost
left a comment
There was a problem hiding this comment.
This looks good and would definitely remove some redundancy across tests specifications.
Just a question on the handling of an EDNS or DNSSEC response. If the OPT flag or the DO flag are missing, the default handling says that a warning should be raised. However the comment suggest this warning could be downgraded to a DEBUG message.
Are responses without the OPT flag or DO flag valid responses? If so why raising a warning?
Or if they are invalid, should we only display a DEBUG message?
Or am I missing something else?
Bad wording. I have rephrased it. Please re-reveiw.
Not really. Either the OPT should be included, or FORMERR is expected. The handling should be set in the test case specification, but at least a debug message should be issued. |
ghost
left a comment
There was a problem hiding this comment.
Thanks for the explanation. Then indeed it seems reasonable to let the test case implementation deal with the missing flag.
|
@mattias-p, @PNAX and @mattias-p, please re-review. |
| * The first CNAME in the chain must match *Query Name*. | ||
| * The last record in the chain must either be a CNAME or a record matching | ||
| *Query Type*. | ||
| * For each owner name of the CNAME records in the chain there must not be any | ||
| additional CNAME records in the answer section (only one CNAME record per | ||
| owner name). |
There was a problem hiding this comment.
I'm curious about an edge case here. Let's say we're following a CNAME chain and the query name is example.com. The answer section contains the following CNAME records:
error.com 3600 IN CNAME example.com
example.com 3600 IN CNAME other.com
The way I read the specification there's one chain in the answer section, and the first CNAME is error.com, which is different from the query name, so none of these records should be fetched. Is that the intended behavior?
I believe the "The first CNAME in the chain must match Query Name." item should be removed from the list of criteria and added as a definition instead.
There was a problem hiding this comment.
I'm curious about an edge case here. Let's say we're following a CNAME chain and the query name is example.com. The answer section contains the following CNAME records:
error.com 3600 IN CNAME example.com example.com 3600 IN CNAME other.comThe way I read the specification there's one chain in the answer section, and the first CNAME is error.com, which is different from the query name, so none of these records should be fetched. Is that the intended behavior?
Yes.
I believe the "The first CNAME in the chain must match Query Name." item should be removed from the list of criteria and added as a definition instead.
I disagree, but I will change the wording somewhat to make intended behavior clear.
| |AA flag | unset | yes | | | ||
| |TC flag | unset | yes | | | ||
| |OpCode | "query" | X | | | ||
| |QR flag | unset | X | Always unset in a query | |
There was a problem hiding this comment.
Why specify here in the comment that the parameter is unset since it is already fixed to unset?
There was a problem hiding this comment.
To underline that fact.
There was a problem hiding this comment.
And this fact is not as important for other fixed unset parameters? (I don't know, it's just I was wondering why only this one had the comment).
There was a problem hiding this comment.
It is just a comment. The choice of the other fixed, and default, values could also be commented, but I have not done that.
|
@mattias-p, I have updated based on your comment. Please re-review. @tgreenx, I have done som updates based on comments from @mattias-p. Please re-review. |
|
@PNAX, please re-review. |
|
|
||
| * Authority and additional sections are by default ignored. | ||
|
|
||
| The test case specification may prescribe that CNAME records are handled in an a |
| * The chain is, by default, considered to be valid if the following criteria | ||
| are met: | ||
| * It must be possible to arrange all CNAME records from the answer section | ||
| into a contiguous logical chain with a posisble addition of a non-CNAME |
|
I think I said it before, but I think this is a good document to have that we can refer to. |
|
@PNAX, please re-review. |
|
@tgreenx, please re-review. |
Purpose
This PR adds a specification for the default setting of the DNS queries that the test cases emit. Test cases are to refer to this specification and use the default setting or specify the deviation.
The specification also has default handling of the response, and that will give consistent handling in the test cases.