Skip to content

fix(connlib): correlate recursive DNS queries via opaque token#13665

Draft
thomaseizinger wants to merge 1 commit into
mainfrom
claude/brave-gauss-tmf9i4-dns-token
Draft

fix(connlib): correlate recursive DNS queries via opaque token#13665
thomaseizinger wants to merge 1 commit into
mainfrom
claude/brave-gauss-tmf9i4-dns-token

Conversation

@thomaseizinger

Copy link
Copy Markdown
Member

The socket-pair on which we received a DNS query is tracked so that the recursive query's response can be routed back to the right device socket. The map key was (transport, local socket, upstream, query ID) — a composite that can collide and silently lose entries in release builds, surfacing as "Failed to find UDP/TCP socket handle for query result" warnings.

Issue a unique, opaque token per recursive DNS query instead. The UDP and TCP DNS clients echo the token back in their query results, making the handle lookup exact and collision-free. The warning no longer dumps the entire bookkeeping map into the log.

Related: #10911

Fixes APPLE-CLIENT-F7


Generated by Claude Code

The socket-pair on which a recursive DNS query was received used to be
tracked by (transport, local socket, upstream, query ID). That composite
key can collide and silently lose entries, surfacing as 'Failed to find
UDP/TCP socket handle for query result' warnings.

Instead, issue a unique token per recursive query that the DNS clients
echo back in their query results, making the lookup exact.

https://claude.ai/code/session_013PMm47vVdTcwYPy9mHmDCV
@thomaseizinger thomaseizinger force-pushed the claude/brave-gauss-tmf9i4-dns-token branch from 0a00a26 to c6b9eb6 Compare June 10, 2026 20:53
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.

2 participants