mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-01 10:06:57 +03:00
resolv: Introduce struct resolv_conf with extended resolver state
This change provides additional resolver configuration state which is not exposed through the _res ABI. It reuses the existing initstamp field in the supposedly-private part of _res. Some effort is undertaken to avoid memory safety issues introduced by applications which directly patch the _res object. With this commit, only the initstamp field is moved into struct resolv_conf. Additional members will be added later, eventually migrating the entire resolver configuration.
This commit is contained in:
@ -84,6 +84,7 @@
|
||||
|
||||
#include <resolv-internal.h>
|
||||
#include <resolv_context.h>
|
||||
#include <resolv_conf.h>
|
||||
#include <not-cancel.h>
|
||||
|
||||
/* Close all open sockets. If FREE_ADDR is true, deallocate any
|
||||
@ -111,6 +112,8 @@ __res_iclose (res_state statp, bool free_addr)
|
||||
statp->_u._ext.nsaddrs[ns] = NULL;
|
||||
}
|
||||
}
|
||||
if (free_addr)
|
||||
__resolv_conf_detach (statp);
|
||||
}
|
||||
libc_hidden_def (__res_iclose)
|
||||
|
||||
|
Reference in New Issue
Block a user