[PATCH] iphlpapi: Retrieve DNS servers from /etc/resolv.conf if possible

Huw Davies huw at codeweavers.com
Thu Feb 9 10:12:53 CST 2017


On Thu, Feb 09, 2017 at 01:28:28PM -0200, Bruno Jesus wrote:
> On Thu, Feb 9, 2017 at 12:15 PM, Erich E. Hoover
> <erich.e.hoover at wine-staging.com> wrote:
> > On Thu, Feb 9, 2017 at 1:52 AM, Huw Davies <huw at codeweavers.com> wrote:
> >> ...
> >> If this does go in, we'll want some kind of caching.
> 
> The other places using fopen (ifstats.c) don't use caching, that was
> where I based the idea on.

Those places are reading virtual files which whose contents are
expected to change.

> Due to the nature of network configuration
> I'm not sure it is a good idea, for example, when to renew the cache?

Generally /etc/resolv.conf doesn't change much, of course this is not
so true with mobile devices.  glibc reads this when you call
res_init().  I guess if you really wanted to you could let the file be
re-read every 5 seconds or so, but not every time the dns server list
is queried.

Huw.



More information about the wine-devel mailing list