This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] [BZ #20900] Call __res_vinit if _PATH_RESCONF is changed


On 12/01/2016 07:56 PM, H.J. Lu wrote:
The content of _PATH_RESCONF may change over time with DHCP.
__res_maybe_init should check if _PATH_RESCONF is changed.  Otherwise
a long-running process will get wrong DNS results if _PATH_RESCONF is
changed by DHCP.

Any comments?

This is not the correct approach. You need a pristine copy of _res and check if the application hasn't made any changes because this is a public interface and such changes are expected (and in one case, even encouraged). The existing behavior (re-init all threads if we re-init one) is buggy for the same reason.

I'm working on a new resolv.conf parser which will address these issues and also eliminate the search path limit.

Florian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]