Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/lib/libc/resolv



On Oct 24, 2009, at 1:35 AM, Christos Zoulas wrote:

Module Name:    src
Committed By:   christos
Date:           Sat Oct 24 05:35:37 UTC 2009

Modified Files:
        src/lib/libc/resolv: res_data.c res_init.c res_private.h res_send.c

Log Message:
Add a knote to keep track when resolv.conf gets changed and re- initialize. While here fix a memory leak when calling res_vinit with an already inited
res_state.

I have mdnsd doing unicast queries and monitoring resolv.conf for changes in my tree, which partially solves this as well -- nameservers update automatically. However, it turns out libc still has to care about resolv.conf changing, because processing of the "search" directive and related config like ndots all happens on the client side. So, something like this change is still useful even if using mdnsd for all hosts lookups.

Unfortunately there's no way for me to use this feature currently. I think it would be sufficient if __res_check() were exposed and returned a flag indicating wether there was a changed or not. I will want to do some filtering of the search list in some cases, and it'd be better to build up my private modified copy of the search list only when the config changes rather than trying to figure it out on every query.

Home | Main Index | Thread Index | Old Index