resolver doesn't see resolv.conf changes

Rostislav Krasny rosti.bsd at gmail.com
Sat Apr 8 00:02:29 UTC 2006


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


More information about the freebsd-stable mailing list