[PR #635] [MERGED] Enforce udp sockets always close #1568

Closed
opened 2026-03-16 02:13:32 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hickory-dns/hickory-dns/pull/635
Author: @bluejekyll
Created: 12/16/2018
Status: Merged
Merged: 12/17/2018
Merged by: @bluejekyll

Base: r0.10Head: enforce-udp-sockets-always-close


📝 Commits (4)

  • 4157b13 wip: UdpClientStream refactored over single use Sockets
  • a9338be fixup UdpClientStream to multiplexed on its own
  • 6a06a19 update all crates to new UdpClientStream (standard features)
  • 3f3eaee update all non-standard features for UDP client

📊 Changes

18 files changed (+481 additions, -154 deletions)

View changed files

📝 crates/client/src/lib.rs (+3 -3)
📝 crates/client/src/udp/udp_client_connection.rs (+17 -11)
📝 crates/https/src/lib.rs (+0 -1)
📝 crates/proto/src/error.rs (+25 -16)
📝 crates/proto/src/lib.rs (+0 -1)
📝 crates/proto/src/op/message.rs (+1 -1)
📝 crates/proto/src/udp/mod.rs (+1 -1)
📝 crates/proto/src/udp/udp_client_stream.rs (+370 -59)
📝 crates/proto/src/udp/udp_stream.rs (+24 -18)
📝 crates/proto/src/xfer/dns_multiplexer.rs (+1 -1)
📝 crates/proto/src/xfer/mod.rs (+3 -5)
📝 crates/resolver/src/lib.rs (+0 -1)
📝 crates/resolver/src/name_server_pool.rs (+18 -19)
📝 crates/server/src/lib.rs (+0 -1)
📝 crates/server/tests/z_named_tests.rs (+4 -4)
📝 tests/integration-tests/tests/client_future_tests.rs (+6 -7)
📝 tests/integration-tests/tests/client_tests.rs (+3 -0)
📝 tests/integration-tests/tests/secure_client_handle_tests.rs (+5 -5)

📄 Description

fixes: #633

This change makes UdpClientStream much more like HttpsClientStream, in that it is already multiplexed. All UdpSockets are now bound to the Future handling the UDP request. In this way, when the Future goes away on the request, the UdpSocket will be closed. This will enforce proper semantics in regards to cache poisoning attacks, better than the method before.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hickory-dns/hickory-dns/pull/635 **Author:** [@bluejekyll](https://github.com/bluejekyll) **Created:** 12/16/2018 **Status:** ✅ Merged **Merged:** 12/17/2018 **Merged by:** [@bluejekyll](https://github.com/bluejekyll) **Base:** `r0.10` ← **Head:** `enforce-udp-sockets-always-close` --- ### 📝 Commits (4) - [`4157b13`](https://github.com/hickory-dns/hickory-dns/commit/4157b137cc13c5b142425aa954b5ab8cbe227f79) wip: UdpClientStream refactored over single use Sockets - [`a9338be`](https://github.com/hickory-dns/hickory-dns/commit/a9338bebe1ffed136f7447ce126e142865624718) fixup UdpClientStream to multiplexed on its own - [`6a06a19`](https://github.com/hickory-dns/hickory-dns/commit/6a06a192728a2e4bc965fa0e3e294fdaf96f6a24) update all crates to new UdpClientStream (standard features) - [`3f3eaee`](https://github.com/hickory-dns/hickory-dns/commit/3f3eaeee721aeffaa673e51cf86e6bdaf3e2d438) update all non-standard features for UDP client ### 📊 Changes **18 files changed** (+481 additions, -154 deletions) <details> <summary>View changed files</summary> 📝 `crates/client/src/lib.rs` (+3 -3) 📝 `crates/client/src/udp/udp_client_connection.rs` (+17 -11) 📝 `crates/https/src/lib.rs` (+0 -1) 📝 `crates/proto/src/error.rs` (+25 -16) 📝 `crates/proto/src/lib.rs` (+0 -1) 📝 `crates/proto/src/op/message.rs` (+1 -1) 📝 `crates/proto/src/udp/mod.rs` (+1 -1) 📝 `crates/proto/src/udp/udp_client_stream.rs` (+370 -59) 📝 `crates/proto/src/udp/udp_stream.rs` (+24 -18) 📝 `crates/proto/src/xfer/dns_multiplexer.rs` (+1 -1) 📝 `crates/proto/src/xfer/mod.rs` (+3 -5) 📝 `crates/resolver/src/lib.rs` (+0 -1) 📝 `crates/resolver/src/name_server_pool.rs` (+18 -19) 📝 `crates/server/src/lib.rs` (+0 -1) 📝 `crates/server/tests/z_named_tests.rs` (+4 -4) 📝 `tests/integration-tests/tests/client_future_tests.rs` (+6 -7) 📝 `tests/integration-tests/tests/client_tests.rs` (+3 -0) 📝 `tests/integration-tests/tests/secure_client_handle_tests.rs` (+5 -5) </details> ### 📄 Description fixes: #633 This change makes UdpClientStream much more like HttpsClientStream, in that it is already multiplexed. All UdpSockets are now bound to the Future handling the UDP request. In this way, when the Future goes away on the request, the UdpSocket will be closed. This will enforce proper semantics in regards to cache poisoning attacks, better than the method before. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-16 02:13:32 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hickory-dns#1568
No description provided.