Fix dns search domain use in gethostbyname.
Need to load search domain data before we attempt to use it. bug:6799630 Change-Id: Ib228f4ca260339f71a2e28d5930c0a722bd43c92
This commit is contained in:
parent
ab0b0cdf1b
commit
c11f6f0f39
@ -272,6 +272,15 @@ res_nsearch(res_state statp,
|
||||
(dots && !trailing_dot && (statp->options & RES_DNSRCH) != 0U)) {
|
||||
int done = 0;
|
||||
|
||||
/* Unfortunately we need to load interface info
|
||||
* (dns servers, search domains) before
|
||||
* the domain stuff is tried. Will have a better
|
||||
* fix after thread pools are used as this will
|
||||
* be loaded once for the thread instead of each
|
||||
* time a query is tried.
|
||||
*/
|
||||
_resolv_populate_res_for_iface(statp);
|
||||
|
||||
for (domain = (const char * const *)statp->dnsrch;
|
||||
*domain && !done;
|
||||
domain++) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user