Mailinglist Archive: opensuse (958 mails)

< Previous Next >
Re: [opensuse] Paths of DNS Queries
On 2019-05-01 6:51 a.m., Carlos E. R. wrote:

The thing is, when an application makes a DNS query, what is the logical
path of
calls that it follows? There are just so many possibilities that come to
mind
"A guide for the perplexed" with a decision chart diagram, branching mindmap
or
something would be nice :-)

I guess the query is first answered or intercepted by nscd, then it goes
to the configured DNS. Ah, wait, first it goes to the host file, which I
think is cached by nscd.

Perhaps I didn't make myself clear.
When an application such as Firefox make a library call "gethostbyname()"
(or is that obsolete now?) what happens?

I may be wrong but I think the first thing that happens is that there is a
look-see to /etc/nsswitch.conf to see what should be invoked.
Mine says:
hosts: files dns
which, I take it, means check /etc/hosts first and then use the configired DNS
resolver if the address isn't found in the hosts file.

Two things occur to me at this point.
The first is that dnsmasq slurps up /etc/hosts anyway so the 'files' entry is
redundant.

The second is I don't see how things get to dnsmasq.
Can someone help me here, please.

Sorry Carlos, "Intercepted' is just too vague a concept.
Somehow, somewhere there is a decision-in-software, an 'if" statement based on a
config file entry, and not a beady-eyed raptor waiting to swoop down on an
unsuspecting rodent.



--
A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting frowned upon?


--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >
List Navigation