Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Apr 2006 13:37:50 +0300
From:      Rostislav Krasny <rosti.bsd@gmail.com>
To:        Ulrich Spoerlein <spoerlein@googlemail.com>
Cc:        stable@freebsd.org
Subject:   Re: resolver doesn't see resolv.conf changes
Message-ID:  <20060407133750.b7080754.rosti.bsd@gmail.com>

next in thread | raw e-mail | index | archive | help

> when switching my laptop from LAN to a dialup connection, applications
> started _before_ the switch will still try to send DNS queries to my
> local DNS server. This isn't ideal, and the only workaround I've found
> so far is to restart the application.
> 
> Is the resolver supposed to periodically check for updates to the
> resolv.conf, or are the applications somehow caching the IP of the DNS
> server?

If you're the author of the application you can periodically unset a
RES_INIT bit mask option in _res.options. Next time your application
will try to call res_send() it will call res_init() at first. This is
according to a resolver(3) manual page.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060407133750.b7080754.rosti.bsd>