Files
Alexandr Stelnykovych 0761ba7b1e fix(resolver): bind local port before pre-authenticating it (#2066)
Portmaster pre-authenticated a randomly chosen local port for its own DNS
queries before binding it. When the port could not be bound, for example
because it lies in a Hyper-V excluded port range on Windows or is held by
another process, the query failed and counted against the resolver.

Plain DNS now binds a socket first, with a port chosen by the OS, and
pre-authenticates that port before sending. DNS over TCP and TLS retry
with another port when binding fails, and the failed port is skipped by
port selection for an hour. A bind failure no longer counts against the
resolver or the network state, as nothing left the host.
Pre-authentication entries that were never consumed are removed again.

Co-authored-by: DannyA <11684554+dannyagostinelli@users.noreply.github.com>
2026-09-25 17:20:36 +03:00
..
2024-08-09 18:15:48 +03:00