gethostbyname() and resolv.conf updates

Pádraig Brady P at
Mon Jun 21 15:33:05 UTC 2010

On 21/06/10 15:40, Colin Walters wrote:
> On Sat, Jun 19, 2010 at 10:54 PM, Dan Williams <dcbw at> wrote:
>> I'm just gonna make NM use a local caching nameserver (which means
>> dnsmasq) by default at some point soon.  People that don't want it can
>> turn it off.
> When thinking about this, there's a rather obvious patch here that
> really should have been made 5+ years ago...make it an option!  And
> this actually makes some sense, e.g. if NetworkManager writes out a
> static configuration, then there's no need to stat() on it since we
> can assume it won't change.  (This does still screw over server admins
> who hand-edit it, but...)
> glibc and NetworkManager patches attached.
> (I'm totally in favor of the dnsmasq approach too since the OS
> desperately needs DNS caching too, but this is a simple patch that
> doesn't conceptually conflict).

Sorry I haven't been following this really, but I loath
config options that aren't absolutely required, and this
seems like a place where we could just stat() (cache) always.
What's the problem with doing that?

Are we worried about the performance of doing time()
for every request? I would never expect anything
resembling efficiency from DHCP, never mind the
overhead of a time() call.
Has debian ever had complaints given that they
patch glibc by default?


p.s. not having looked at the code,
the atomic ops seems unusual in the
presence of the static last_... variables.

More information about the devel mailing list