Mailinglist Archive: opensuse (958 mails)

< Previous Next >
Re: [opensuse] Paths of DNS Queries
On 2019-05-01 7:47 a.m., Carlos E. R. wrote:
On 01/05/2019 13.22, Anton Aylward wrote:

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
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

Before that point (before reading from /etc/hosts) is the nscd intercept.

You mean that -- somehow, some unspecified manner -- that happens before the
decision as to whether to use files or DNS or something else as determined by
the nsswitch.conf file is accessed?

As I said, I'm using dnsmasq and NOT nscd.

The decision path still has to be there.

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.

nscd is not in the "official" loop, IMHO, so instead it puts itself in
the middle intercepting some library calls

Right now you are talking the realm of magic and I don't accept it.
This is a computer. there HAS to be a deterministic, repeatable, identifiable,
documented mechanism that works for everyone, even those of us living in
mana-poor areas of the world.

"Intercept" is too vague a concept.
There HAS to be a decision path arising from a configuration file setting.
This beady-eyed raptor waiting to whoop down and 'intercept' is too
asynchronous, to inconsistent and unreliable.

and giving an answer without
the library reaching its designed goal of reading the hosts file or
querying a DNS.

I can not explain in detail because I do not know, I simply guess.

I too guess, but then I investigate and look for documentation.
If I can't find it I discard that guess and try antoehr one.

I've found that dnsmasq wants to listen locally so there should be an entry in
the /etc/resolv.conf file of
Now I need to figure out how "gethostentrybyname()" ends up at /etc/resolv.conf

The getting to dnsmasq is the same thing as getting to bind, or getting
to the caching server in your router. No difference. It is just a DNS
server somewhere in the entire world, just that it happens to sit locally.

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