[PR #2116] [MERGED] Increase source port entropy in UDP client #2815

Closed
opened 2026-03-16 11:09:48 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hickory-dns/hickory-dns/pull/2116
Author: @marcus0x62
Created: 12/24/2023
Status: Merged
Merged: 1/1/2024
Merged by: @bluejekyll

Base: mainHead: source_port_entropy


📝 Commits (1)

  • 5614841 Increase source port entropy in UDP client

📊 Changes

1 file changed (+5 additions, -4 deletions)

View changed files

📝 crates/proto/src/udp/udp_stream.rs (+5 -4)

📄 Description

The existing code uses ports 49152 - 65535 for ephemeral port selection. This can be safely increased to the entire dynamic/private range of 1024 - 65535, and it is recommended to do this by RFC 6056 (Section 3.2:)

As mentioned in Section 2.1, the dynamic ports consist of the range
49152-65535. However, ephemeral port selection algorithms should use
the whole range 1024-65535.

This results in a 4x increase in combined source port/query id entropy.


🔄 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/2116 **Author:** [@marcus0x62](https://github.com/marcus0x62) **Created:** 12/24/2023 **Status:** ✅ Merged **Merged:** 1/1/2024 **Merged by:** [@bluejekyll](https://github.com/bluejekyll) **Base:** `main` ← **Head:** `source_port_entropy` --- ### 📝 Commits (1) - [`5614841`](https://github.com/hickory-dns/hickory-dns/commit/5614841b1ed01051f3a5d94ca84ed3ca223c7b56) Increase source port entropy in UDP client ### 📊 Changes **1 file changed** (+5 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `crates/proto/src/udp/udp_stream.rs` (+5 -4) </details> ### 📄 Description The existing code uses ports 49152 - 65535 for ephemeral port selection. This can be safely increased to the entire dynamic/private range of 1024 - 65535, and it is recommended to do this by RFC 6056 (Section 3.2:) > As mentioned in Section 2.1, the dynamic ports consist of the range > 49152-65535. However, ephemeral port selection algorithms should use > the whole range 1024-65535. This results in a 4x increase in combined source port/query id entropy. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-16 11:09:48 +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#2815
No description provided.