mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 03:05:51 +03:00
[PR #2780] [MERGED] Preserve fully qualified status of Name after prepend_label #3312
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#3312
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/2780
Author: @dead10ck
Created: 2/14/2025
Status: ✅ Merged
Merged: 2/16/2025
Merged by: @djc
Base:
main← Head:fix/name-prepend-label📝 Commits (2)
3c1075dmake Name::prepend_label preserve fqdn032cf54check length violation before mutation📊 Changes
1 file changed (+50 additions, -3 deletions)
View changed files
📝
crates/proto/src/rr/domain/name.rs(+50 -3)📄 Description
make Name::prepend_label preserve fqdn
Currently, if you have a fully qualified
Nameand you add a label withprepend_label, the resultingNameis not fully qualified. This change modifies the behavior so that if the fully qualified marker of the inputNameis the same in the newName.check length violation before mutation
Currently, when appending a label to a name, the label is appended first, and then the length of the buffer is checked. This returns an error, but still leaves the buffer in an illegal state, potentially allowing further use if the Name is not disregarded after this point.
Instead the new length is checked before mutating the buffer, leaving it unmodified if the result would be too long.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.