mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +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:
@ -613,6 +613,7 @@ p_option(u_long option) {
|
||||
case RES_SNGLKUPREOP: return "single-request-reopen";
|
||||
case RES_USE_DNSSEC: return "dnssec";
|
||||
case RES_NOTLDQUERY: return "no-tld-query";
|
||||
case RES_NORELOAD: return "no-reload";
|
||||
/* XXX nonreentrant */
|
||||
default: sprintf(nbuf, "?0x%lx?", (u_long)option);
|
||||
return (nbuf);
|
||||
|
Reference in New Issue
Block a user