resolv icon indicating copy to clipboard operation
resolv copied to clipboard

Fix TCP fallback with multiple nameservers [Bug #8285]

Open opti opened this issue 1 year ago • 1 comments

Originally reported here https://bugs.ruby-lang.org/issues/8285, but the patch has never been finalized.

We stumbled on the same issue under the following conditions:

  • Multiple nameservers are configured for Resolv::DNS
  • A nameserver falls back from UDP to TCP requester due to the message size
  • TCP request hits Resolv::DNS timeout
  • Resolv::DNS retries the next nameserver

Expected result:

Resolv::DNS successfully falls back to the next nameserver, using TCP request.

Actual result:

Resolv::DNS::Requester::RequestError: host/port don't match is raised.

This pull request:

  • Finalizes original patch proposed by @jmehnle.
  • Adds a test case for the scenario above.

opti avatar Apr 24 '24 04:04 opti

@sorah, @nobu any chance this can be reviewed?

opti avatar May 03 '24 15:05 opti

@hanazuki These are valid points. Thank you for the detailed explanation. I've added your commit to this pull request. Thanks for looking into it.

opti avatar Jun 03 '24 22:06 opti

@hanazuki any chance this fix can be merged?

opti avatar Jul 10 '24 20:07 opti

+1 to merge. I'm not the maintainer and cannot merge or approve PRs.

What do you think, @sorah @nobu?

hanazuki avatar Jul 11 '24 03:07 hanazuki

Any thoughts ☝️ @sorah, @nobu, @hsbt?

opti avatar Aug 13 '24 19:08 opti