mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 11:15:54 +03:00
[PR #2231] [MERGED] refactor the Resource data structure #2890
Labels
No labels
blocked
breaking-change
bug
bug:critical
bug:tests
cleanup
compliance
compliance
compliance
crate:all
crate:client
crate:native-tls
crate:proto
crate:recursor
crate:resolver
crate:resolver
crate:rustls
crate:server
crate:util
dependencies
docs
duplicate
easy
easy
enhance
enhance
enhance
feature:dns-over-https
feature:dns-over-quic
feature:dns-over-tls
feature:dnsssec
feature:global_lb
feature:mdns
feature:tsig
features:edns
has workaround
ops
perf
platform:WASM
platform:android
platform:fuchsia
platform:linux
platform:macos
platform:windows
pull-request
question
test
tools
tools
trust
unclear
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hickory-dns#2890
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hickory-dns/hickory-dns/pull/2231
Author: @japaric
Created: 6/7/2024
Status: ✅ Merged
Merged: 6/11/2024
Merged by: @bluejekyll
Base:
main← Head:ja-refactor-resource📝 Commits (1)
869ee36refactor theResourcedata structure📊 Changes
55 files changed (+1021 additions, -1457 deletions)
View changed files
📝
bin/tests/named_tests.rs(+2 -2)📝
bin/tests/server_harness/mod.rs(+3 -3)📝
crates/client/src/client/async_client.rs(+5 -4)📝
crates/client/src/lib.rs(+2 -2)📝
crates/proto/src/h2/h2_client_stream.rs(+7 -13)📝
crates/proto/src/h3/h3_client_stream.rs(+7 -13)📝
crates/proto/src/op/edns.rs(+5 -11)📝
crates/proto/src/op/message.rs(+6 -6)📝
crates/proto/src/op/update_message.rs(+8 -11)📝
crates/proto/src/rr/dnssec/rdata/tsig.rs(+13 -13)📝
crates/proto/src/rr/dnssec/signer.rs(+76 -113)📝
crates/proto/src/rr/dnssec/tbs.rs(+2 -8)📝
crates/proto/src/rr/dnssec/tsig.rs(+1 -1)📝
crates/proto/src/rr/mod.rs(+5 -0)➕
crates/proto/src/rr/rdata/update.rs(+1 -0)📝
crates/proto/src/rr/record_data.rs(+11 -0)📝
crates/proto/src/rr/resource.rs(+58 -165)📝
crates/proto/src/rr/rr_set.rs(+115 -132)📝
crates/proto/src/serialize/txt/rdata_parsers/svcb.rs(+1 -6)📝
crates/proto/src/serialize/txt/zone.rs(+11 -14)...and 35 more files
📄 Description
the
rr_typefield has been removed. this eliminates the possibility of settingrdatato a type that does not matchrr_type. as a consequence, theset_record_typehas also been removedthe
record_typeof theResourceis now derived from what's stored in therdatafieldrdatais no longer anOption.rdata = Nonewas being used to represent update records. anUpdatevariant has been added to theRDataenum. this variant is used to represent update records, which have RDLENGTH set to 0.the
Resource::{default,new}constructors have been removed. they felt error prone as in most cases one wants to set therdataandnamefields since they have no sensible defaults. all uses of those constructors now use the pre-existingfrom_rdataconstructorthe
Resource::withconstructor has also been removed. it was pretty similar tofrom_rdatabut initializedrr_typeand notrdata. all uses ofRecord::withhas been changed tofrom_rdatacloses #2211
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.