Skip to content
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

Set the AA flag and include glue in responses. #400

Merged
merged 494 commits into from
Oct 3, 2024

Conversation

ximon18
Copy link
Member

@ximon18 ximon18 commented Oct 2, 2024

This PR attempts to fix two issues and adds a Stelline test based on the scenario in RFC 1034 section 6 to demonstrate compliance.

  1. AA flag not set on authoritative responses. This PR sets the AA flag on zone queries whose response is not a referral. Answers at zone cuts are constructed by calling NodeAnswer::authority() which has been updated to set an authoritative flag to false, while other NodeAnswer constructors set the flag to true. NodeAnswer::into_answer() then carries the flag through to Answer and Answer::to_message() sets the AA header flag based on this new authoritative flag.

  2. Missing glue in responses. This PR extends AnswerAuthority::new() to take additional records (provided from glue) as well as other data, and Answer::to_message() is extended to add any additional records to the response.

This PR also extends Stelline to:

  • Support MATCH ANY_ANSWER whereby if additional answers are supplied using the EXTRA_PACKET Stelline directive then the expected response will be matched against any of them, rather than the default behaviour of treating multiple answers as one large answer (which was supported already and used for unknown ordered and split large XFR answers across multiple responses).
  • Support loading of multiple zone files from the test-data directory into the server under test.

- Don't pass the key store around, we  need only the signer when post-processing.
- Get tid of the mutex, we don't need it.
- Don't clone metadata when invoking a stream post-processing callback.
- Add key_wrapper() fn to ServerTransaction, ServerSequence and SigningContext to allow access to the key by its original type (which might e.g. be Arc<Key> allowing the Arc to be cloned rather than a deep copy being made).
…f available, via a new TruncationContext type.

- Truncate for TCP as well as UDP.
- Return ServiceError::InternalError if truncation fails.
- Implement handling of ServiceError in DgramServer and stream::Connection.
- Break DgramServer and stream::Connection dispatch to service code out into helper RequestDispatcher types.
- Terminate the response stream if ServiceError::InternalError occurs.
…do any processing of the data other than to translate it into a different higher level language, i.e. interpret it.
@ximon18 ximon18 added the bug Something isn't working label Oct 2, 2024
@ximon18 ximon18 requested a review from a team October 2, 2024 07:42
@ximon18 ximon18 changed the base branch from zone-tweaks to main October 3, 2024 10:53
ximon18 and others added 9 commits October 3, 2024 13:47
* Link to definition of DNS
* Also spell out DNS.

---------

Co-authored-by: Martin Hoffmann <[email protected]>
This PR adds a few trait impls and documentation.

Specifically:

* Add blanket `SendRequest` and `SendRequestMulti` impls for boxes.
* Add `Display` impl to `tsig::Key`.
* Add an `as_any` method and `Clone` and `Debug` impls to various zonetree
  types.
* Add `AsRef<dyn ZoneStore>` to `Zone`.
@partim partim merged commit f111cc6 into main Oct 3, 2024
26 checks passed
@partim partim deleted the rfc1034-set-aa-and-include-glue-in-responses branch October 3, 2024 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants