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

Support not sized octets in ZoneRecordData and UnknownRecordData #237

Merged

Conversation

hunts
Copy link
Contributor

@hunts hunts commented Oct 25, 2023

These two record data impls shall also support not sized octets like the other implementations of concrete record types.

To allow for trading the parsed record that is not sized for a resource record. For example:

let msg: &Message<[u8]>: ...
let answer = msg.answer()?;

for parsed_rr in answer.filter_map(|r| r.ok()) {
    if let Ok(Some(rr)) = parsed_rr.into_record::<ZoneRecordData<_, _>>() {
        ...
    }
}

These two record data impls should also support not sized octets like the
other implementations of concrete record types.
@partim
Copy link
Member

partim commented Oct 26, 2023

Thank you for the PR!

You are, of course, correct. This looks like an oversight when we refactored this code.

@partim partim merged commit 821b509 into NLnetLabs:main Oct 26, 2023
@hunts hunts deleted the hunts/support-not-sized-parse-record-data branch October 26, 2023 18:23
@hunts
Copy link
Contributor Author

hunts commented Oct 26, 2023

Thank you Sir. Hope we'll have a 0.9.1 soon :)

@partim
Copy link
Member

partim commented Oct 27, 2023

That certainly can be arranged.

partim added a commit that referenced this pull request Oct 27, 2023
Bug fixes

* Added missing `?Sized` bounds to the octets type for parsing
  `ZoneRecordData` and `UnknownRecordData`. ([#237] by [@hunts])
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.

2 participants