Skip to content

Skip search candidates longer than 255 octets - #156

Open
hsbt wants to merge 1 commit into
masterfrom
claude/mystifying-nobel-368c44
Open

hsbt wants to merge 1 commit into
masterfrom
claude/mystifying-nobel-368c44

Conversation

@hsbt

@hsbt hsbt commented Oct 8, 2026

Copy link
Copy Markdown
Member

When a relative name fits in 255 octets but appending a search domain pushes it over, Resolv::DNS still sends the query for that candidate. The decoder rejects a name that long in the reply, so the lookup waits out the whole timeout before trying the next candidate. With the default timeouts and one nameserver, a single getaddress stalls for 150 seconds.

This skips such a candidate in Config#generate_candidates and goes on with the remaining ones. Candidates within 255 octets are unchanged. I left the encoder alone, because generate_candidates is the only place that builds a longer name out of a valid one.

Generated with Claude Code

Appending a search domain can take a relative name past the 255 octet limit. The query was still sent, and because the decoder rejects a name that long in the reply, the lookup sat until the timeout before trying the next candidate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

1 participant