Skip to content

Add UDP DNS receive timeouts and random query IDs#560

Merged
ryanfowler merged 1 commit into
mainfrom
fix-udp-dns-timeout-and
May 25, 2026
Merged

Add UDP DNS receive timeouts and random query IDs#560
ryanfowler merged 1 commit into
mainfrom
fix-udp-dns-timeout-and

Conversation

@ryanfowler
Copy link
Copy Markdown
Owner

Summary

  • Thread DNS timeout values through custom UDP lookup paths so unresponsive resolvers cannot hang indefinitely.
  • Add a shared DNS utility for random u16 query IDs and a 5s default UDP receive timeout when no request/connect timeout is set.
  • Update both resolver and DNS inspection code to use the shared helpers and tokio::time::timeout around recv.
  • Add focused unit coverage for UDP timeout behavior and keep existing DNS resolution paths intact.

Testing

  • cargo fmt
  • cargo clippy --locked --all-targets --all-features -- -D warnings
  • cargo test --all-features
  • cargo test --all-features --test integration -- --test-threads=1

@ryanfowler ryanfowler enabled auto-merge May 25, 2026 02:36
@ryanfowler ryanfowler merged commit 599676c into main May 25, 2026
4 checks passed
@ryanfowler ryanfowler deleted the fix-udp-dns-timeout-and branch May 25, 2026 02:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant