Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <aa76ced8-2faa-4787-9db0-392aac20411a@app.fastmail.com>
Date: Wed, 26 Feb 2025 11:31:02 +0100
From: roblabla <musl@...lab.la>
To: musl@...ts.openwall.com
Subject: Re: [PATCH] resolvconf: Set minimum timeout value to 1

> The question is what was the user intent when setting timeout to 0
> or a negative value.
> Surely that wouldn't be having a timeout of 1,
> because they would have put a timeout of 1.

I was able to trace this practice to a (I think misguided) stackoverflow answer[0], which claims that

> The effect is that the resolver asks the number of nameservers without waiting and returns the first response. It should be used only when your first server in the resolv.conf is overloaded. But normally it has no effect, because the dns responses are quick. 

This is, of course, not really true (glibc will act as if a timeout of 1 was specified - it will still wait a second for the answer of the first nameserver, before asking the next one), and anyways a moot point in musl since it asks all nameservers in parallel instead of one after the other.

So my best guess is that people are setting the timeout to 0 to workaround a faulty/laggy first nameserver in their resolv.conf causing undue lag in their glibc-based apps.


[0]: https://unix.stackexchange.com/questions/120623/what-is-the-effect-of-setting-the-timeout-value-to-0-in-etc-resolv-conf

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.