mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 03:05:51 +03:00
[PR #1975] [MERGED] Fix truncation for UDP #2730
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#2730
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/1975
Author: @nmittler
Created: 6/21/2023
Status: ✅ Merged
Merged: 6/27/2023
Merged by: @bluejekyll
Base:
main← Head:recv_buf📝 Commits (1)
96681daFix truncation for UDP📊 Changes
9 files changed (+206 additions, -31 deletions)
View changed files
📝
crates/proto/src/serialize/binary/encoder.rs(+4 -4)📝
crates/proto/src/udp/mod.rs(+4 -0)📝
crates/proto/src/udp/udp_client_stream.rs(+15 -7)📝
crates/proto/src/udp/udp_stream.rs(+2 -1)📝
crates/server/src/authority/catalog.rs(+16 -15)📝
crates/server/src/authority/message_response.rs(+5 -0)📝
crates/server/src/server/response_handler.rs(+41 -3)📝
crates/server/src/server/server_future.rs(+1 -1)➕
tests/integration-tests/tests/truncation_tests.rs(+118 -0)📄 Description
This fixes a couple of issues for UDP on both the client and server:
2048for the size of the receive buffer. This can cause problems on interfaces with a larger MTU. PR 1096 adjusted this value on the server side to 4096 (the maximum as recommended by RFC6891). This PR sets a constant that is shared by the UDP client and server. Additionally, the client uses EDNS in the request to further trim down the buffer size.BinEncoder, which defaults tou16::MAX(i.e. effectively no truncation for UDP). This PR sets an appropriate maximum for theBinEncoderbased on the response EDNS and protocol being used.Fixes: #1973
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.