On Windows, an ICMP "port unreachable" no longer surfaces as a UDP receive error #17
Labels
No labels
agent
api-regen
agent
architect
agent
coder
agent
console-coder
agent
docs-writer
agent
mechanic
agent
protocol-coder
agent
storage-coder
area/api
area/ci
area/console
area/dhcp
area/dns
area/docs
area/packaging
area/process
area/storage
area/windows
kind
bug
kind
chore
kind
docs
kind
epic
kind
feature
kind
performance
kind
security
kind
test
priority
high
priority
low
priority
medium
resolution
duplicate
resolution
not-a-bug
resolution
wontfix
status
blocked
status
in-progress
status
needs-decision
status
needs-design
status
ready
theme
ad-samba-dns
theme
alternatives-benchmark
theme
console-toolchain
theme
later
theme
parity-devices
theme
parity-query
theme
post-release-fixes
theme
tracker-setup
theme
valkey
theme
windows-installer
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Reference
lantea-one/ninlil#17
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
On Windows a UDP socket reports an ICMP port-unreachable for an earlier send as
SocketExceptionConnectionReset (10054) on the next receive. The RP-4 DHCP live tests hit this("An existing connection was forcibly closed by the remote host" at
ReceiveFromAsync).UdpDnsListener(src/dotnet/src/Ninlil.Dns.Protocol.Plain/UdpDnsListener.cs:155-170) andDnsCryptUdpListenerlog each such exception as a Warning and continue, so a client that sends aquery and closes its port turns into a Warning line on Windows, which an off-path sender can
provoke at will.
What changes
First reproduce on Lofnheim (query, close the client socket before the reply, check the log).
If confirmed: on Windows, turn the behaviour off on every UDP listening socket with
socket.IOControl(SIO_UDP_CONNRESET, false)(WinsockSIO_UDP_CONNRESET, documented byMicrosoft) at bind time, in the shared listen-socket code
(
src/dotnet/src/Ninlil.Dns.Server.Core/Transport/) if the DNS UDP listeners share it.Acceptance
before the reply, then sends a second query from another socket: no Warning logged, the
second query answered. Red without the fix.
Source
RP-4 report finding 3 ("the UDP ICMP-reset behaviour"); inference from the product code, not yet
observed on a product listener.
Ghost referenced this issue2026-11-06 12:32:24 -05:00
Owner decision Q-ARCH-1 (#260):
Ninlil.Dhcp.CommonreferencingNinlil.Common.Extensionfor the sharedIgnoreIcmpPortUnreachablehelper is accepted. Shared helpers live once inNinlil.Common.*; do not copy them.Ghost referenced this issue2026-11-06 17:41:55 -05:00
Ghost referenced this issue2026-11-06 20:06:00 -05:00
Ghost referenced this issue2026-11-06 20:40:58 -05:00
Ghost referenced this issue2026-11-06 21:29:02 -05:00