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

XFR response interpreter. #375

Merged
merged 214 commits into from
Sep 17, 2024
Merged

XFR response interpreter. #375

merged 214 commits into from
Sep 17, 2024

Conversation

ximon18
Copy link
Member

@ximon18 ximon18 commented Aug 21, 2024

Based on code in the xfr branch which should be replaced by this code, in order to split PR #335 into several smaller PRs.

This PR adds an interpreter for XFR responses which handles the low level XFR protocol details and emits higher level zone updates based on the received data for consumers to deal with without regard for the low level details.

Subsequent PRs will build on this work to:

  • Update zones based on the output of XfrResponseInterpreter (See XFR zone updating. #376)
  • Use a streaming capable client with the XfrResponseInterpreter in this PR to do XFR client work for the ZoneMaintainer in the xfr branch.

ximon18 and others added 30 commits August 6, 2024 23:34
…tain number of bytes should be reserved (to make space for post-processing adding EDNS options to the response), and (b) strongly typed passing of arbitrary metadata between middleware that produces a type and middleware that consumes the type (e.g. a TSIG key name).
…o that a wrapper client (such as a future TSIG client) can augment the message before it gets sent.
- Added a simple UDP client that doesn't interfere with requests before sending (for TSIG testing).
- Added support for receiving multiple responses (for XFR testing).
- Added support for connection timeout errors
- Added support for connection termination errors (for EDNS testing).
- Added support for specifying the TSIG key to use (for TSIG testing).
- Added support for $ORIGIN in zone file fragments.
- Simplified rcode checking and use it instead of the yxrrset BADCOOKIE hack.
- In memory channel changes:
  - Fixed a trace message that incorrectly referred to client instead of server.
  - Fixed a too-tight connection read loop that was preventing Tokio task switching.
  - Added connection shutdown detection.
- Fixed incorrect setting of TCP mode to true when UDP mode was requested.
@ximon18 ximon18 changed the title XFR response processing. XFR response interpreting. Sep 16, 2024
Base automatically changed from tsig-middleware to main September 16, 2024 14:25
@ximon18 ximon18 changed the title XFR response interpreting. XFR response interpreter. Sep 16, 2024
…, e.g. we may be able to use this for DNS UPDATE later as well.
…d minor improvements: rename `process_answer()` to `interpret_response()`, remove the unused `ZoneUpdate::Corrupt` enum variant, rename `ProcessingError` to `Error`, add `Error::Finished`.
@ximon18 ximon18 merged commit 2c70085 into main Sep 17, 2024
26 checks passed
@ximon18 ximon18 deleted the xfr-response-processing branch September 17, 2024 13:24
ximon18 added a commit that referenced this pull request Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants