mirror of
https://github.com/safing/portmaster.git
synced 2026-12-05 01:53:01 +00:00
0761ba7b1e
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>