1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-28 00:21:52 +03:00

resolv: Automatically reload a changed /etc/resolv.conf file [BZ #984]

This commit enhances the stub resolver to reload the configuration
in the per-thread _res object if the /etc/resolv.conf file has
changed.  The resolver checks whether the application has modified
_res and will not overwrite the _res object in that case.

The struct resolv_context mechanism is used to check the
configuration file only once per name lookup.
This commit is contained in:
Florian Weimer
2017-07-03 21:06:23 +02:00
parent a1c4eb8794
commit aef16cc8a4
11 changed files with 273 additions and 95 deletions

View File

@ -97,7 +97,4 @@ int __res_nopt (struct resolv_context *, int n0,
int __inet_pton_length (int af, const char *src, size_t srclen, void *);
libc_hidden_proto (__inet_pton_length)
/* Used to propagate the effect of res_init calls across threads. */
extern unsigned long long int __res_initstamp attribute_hidden;
#endif /* _RESOLV_INTERNAL_H */