resolver doesn't see resolv.conf changes

Artyom Viklenko artem at aws-net.org.ua
Fri Apr 7 16:46:20 UTC 2006


<cite from="Hajimu UMEMOTO">
> Hi,
>
>>>>>> On Wed, 5 Apr 2006 17:27:19 +0200
>>>>>> Ulrich Spoerlein <spoerlein at googlemail.com> said:
>
> spoerlein> Is the resolver supposed to periodically check for updates to
> the
> spoerlein> resolv.conf, or are the applications somehow caching the IP of
> the DNS
> spoerlein> server?
>
> Traditionally, the resolver doesn't reread resolv.conf.  It is not
> useful for especially mobile environment.  So, I wrote a patch to
> reread resolv.conf in past.
> Recently, I noticed that it could be implemented as a NSS plug-in, and
> made it just today.  You can get it from:
>
> 	http://www.imasy.or.jp/FreeBSD/nss_resinit-20060408.tar.gz
>
> I don't write any documentation, yet.  But, it should work by changing
> `hosts' entry in /etc/nsswitch.conf to the following line:
>
> 	hosts: resinit files dns
>
> It seems working on my 7-CURRENT box and 6-STABLE box.  However, it
> should be tested more.

Alternatively, it is possible to use caching  DSN server on local machine.
In reslolv.conf you can write 'nameserver 127.0.0.1' and then
reconfigure and restart bind than connecting to different networks.
Applications still use 127.0.0.1 as nameserver. And no any patches.
Works for me. May be not suitable for all situations. :)

-- 
           Sincerely yours,
                            Artyom Viklenko.
-------------------------------------------------------
artem at aws-net.org.ua | http://www.aws-net.org.ua/~artem
FreeBSD: The Power to Serve   -  http://www.freebsd.org




More information about the freebsd-stable mailing list