diff options
author | Robert Greenwalt <rgreenwalt@google.com> | 2014-03-05 18:26:26 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-03-05 18:26:27 +0000 |
commit | abf91850f96858a286de268267ca5cf337ec9a3b (patch) | |
tree | ad648e311f2b1c1b29596ea7ad98d13845720209 | |
parent | 806f3bd7aaec5b7444b1b218b69b3952386cb92f (diff) | |
parent | 5fddfb89152a008c8de3e883ff1af28dc8b2cc70 (diff) | |
download | bionic-abf91850f96858a286de268267ca5cf337ec9a3b.zip bionic-abf91850f96858a286de268267ca5cf337ec9a3b.tar.gz bionic-abf91850f96858a286de268267ca5cf337ec9a3b.tar.bz2 |
Merge "Fix dns searchdomain use in gethostbyname." into klp-dev
-rw-r--r-- | libc/netbsd/resolv/res_query.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libc/netbsd/resolv/res_query.c b/libc/netbsd/resolv/res_query.c index 8e1321e..d31e83c 100644 --- a/libc/netbsd/resolv/res_query.c +++ b/libc/netbsd/resolv/res_query.c @@ -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++) { |