mailing list of musl libc
 help / color / mirror / code / Atom feed
From: JinCheng Li <naiveli233@outlook.com>
To: musl <musl@lists.openwall.com>
Subject: [musl] Question about tcp failure in udp truncated scenarios
Date: Fri, 13 Sep 2024 13:56:49 +0000	[thread overview]
Message-ID: <SE1P216MB248429552230F8F04DB93F8F9E652@SE1P216MB2484.KORP216.PROD.OUTLOOK.COM> (raw)

[-- Attachment #1: Type: text/plain, Size: 1015 bytes --]

Hi

    I have a question for __res_msend_rc in dns query. In the case of multiple nameservers, if the first vaild udp query result is truncated,  musl will discard the udp query result and turn to tcp query. But I found many dns nameservers do not response to the tcp connection or do not respond to tcp query request which will finally trigger timeout. As a result, the success rate of DNS queries is greatly reduced when udp is truncated, for example, in the case of only IPV4.
    In bionic, the dns query in multiple nameservers is one by one. The first udp is truncated, if the tcp also fail, it will turn to the second udp and do it again. This may be slower than musl in terms of speed, but is more stable in truncation cases.
    In musl, if the udp truncated case has happened, we will convert to tcp which is more likely not supported by the nameserver and discard all other udp response which may be also valid from other nameserver . Do you have any good suggestions to optimize this?

Best
Li

[-- Attachment #2: Type: text/html, Size: 2701 bytes --]

             reply	other threads:[~2024-09-13 13:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-13 13:56 JinCheng Li [this message]
2024-09-13 14:27 ` Markus Wichmann
2024-09-13 14:38   ` Rich Felker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=SE1P216MB248429552230F8F04DB93F8F9E652@SE1P216MB2484.KORP216.PROD.OUTLOOK.COM \
    --to=naiveli233@outlook.com \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).