resolved: closes listening socket too rapidly and sends Destination port unreachable
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
systemd (Ubuntu) |
Expired
|
Undecided
|
Unassigned |
Bug Description
Afffects Ubuntu 18.04 through 21.04 (fixes are in systemd v248)
With systemd v245 (and v247) and systemd-resolved we're seeing frequent problems due to resolved rapidly closing the socket on which it sends out a query before the server has answered. The server answers and then resolved sends an ICMP Destination Unreachable (Port Unreachable) response!
This breaks name lookups frequently. In our case the DNS server is reached via a Wireguard tunnel over a satellite link and latencies can vary.
A typical example captured via tcpdump:
07:22:03.446919 IP6 fddc:7e00:
07:22:03.501089 IP6 fddc:7e00:
07:22:03.501152 IP6 fddc:7e00:
The time difference here is only 0.054170 and there is no way to alter the timeout in resolved.
There are recent upstream commits to fix this which ought to be cherry-picked. See:
https:/
https:/
https:/
If I am reading the code correctly the timeout is very short:
src/resolve/
src/resolve/
src/resolve/
So in micro-seconds that is 120 /24 = 5 per query with, as inferred, up to 24 attempts (I don't see multiple duplicate requests on the wire so not sure DNS_TRANSACTION
> The server answers and then resolved sends an ICMP Destination Unreachable (Port Unreachable) response!
> This breaks name lookups frequently.
I'm unclear on how/why you are connecting these two statements...can you explain why it's breaking name lookups?