How to disable DNS lookups?
eagle at eyrie.org
Wed Jul 26 03:05:18 CEST 2017
u-hd-phes at aetey.se writes:
> On Tue, Jul 25, 2017 at 02:58:29PM -0400, Roland C. Dowdeswell wrote:
>> It is counter-intuitive to expect that /etc/hosts will interpose in the
>> middle of a lookup.
> I second Russ and do not agree with you on this point.
> Given that SRV records as a matter of fact are defined via A[AAA]
> records, (and given that A lookups historically _are_ interposed by
> /etc/hosts) what says that /etc/hosts are to be ignored if an A lookup
> happens as a consequence of an SRV one?
Yup, agreed. I'm unconvinced by the argument that this is confusing.
My mental model of how an implementation that uses SRV records works is
that it does a SRV query to find the list of hosts and weights, and then,
for each host in weight order, does a gethostinfo(3) call on that
hostname. This will, in fact, interpose /etc/hosts with a standard
nsswitch configuration. Now, perhaps my mental model is wrong for a given
implementation, but (a) the resulting behavior is very useful for testing
and something I've used for years, and (b) it's not an *unreasonable*
mental model, or particularly confusing.
Russ Allbery (eagle at eyrie.org) <http://www.eyrie.org/~eagle/>
More information about the Heimdal-discuss