diff --git a/headers/posix/resolv.h b/headers/posix/resolv.h
index 7ed5767..c73f052 100644
a
|
b
|
union res_sockaddr_union {
|
238 | 238 | #define RES_NOTLDQUERY 0x00100000 /* don't unqualified name as a tld */ |
239 | 239 | #define RES_USE_DNSSEC 0x00200000 /* use DNSSEC using OK bit in OPT */ |
240 | 240 | /* #define RES_DEBUG2 0x00400000 */ /* nslookup internal */ |
| 241 | #define RES_USE_INET4 0x00800000 /* use IPv4 in gethostbyname() */ |
241 | 242 | /* KAME extensions: use higher bit to avoid conflict with ISC use */ |
242 | 243 | #define RES_USE_DNAME 0x10000000 /* use DNAME */ |
243 | 244 | #define RES_USE_EDNS0 0x40000000 /* use EDNS0 if configured */ |
diff --git a/src/kits/network/libbind/irs/getaddrinfo.c b/src/kits/network/libbind/irs/getaddrinfo.c
index 1839ba4..b95e6cd 100644
a
|
b
|
getaddrinfo(hostname, servname, hints, res)
|
328 | 328 | struct addrinfo ai, ai0, *afai = NULL; |
329 | 329 | struct addrinfo *pai; |
330 | 330 | const struct explore *ex; |
| 331 | struct net_data *net_data; |
331 | 332 | |
332 | 333 | memset(&sentinel, 0, sizeof(sentinel)); |
333 | 334 | cur = &sentinel; |
… |
… |
getaddrinfo(hostname, servname, hints, res)
|
501 | 502 | if (hostname == NULL) |
502 | 503 | SETERROR(EAI_NONAME); |
503 | 504 | |
| 505 | /* init after numeric lookups to avoid recursion in resolv.conf */ |
| 506 | net_data = init(); |
| 507 | if ((net_data->res->options & RES_USE_INET4) && ai0.ai_family == PF_UNSPEC) |
| 508 | ai0.ai_family = PF_INET; |
| 509 | |
504 | 510 | /* |
505 | 511 | * hostname as alphabetical name. |
506 | 512 | * We'll make sure that |
diff --git a/src/kits/network/libbind/resolv/res_debug.c b/src/kits/network/libbind/resolv/res_debug.c
index 8446bbb..3e1d2c6 100644
a
|
b
|
p_option(u_long option) {
|
680 | 680 | case RES_INSECURE2: return "insecure2"; |
681 | 681 | case RES_NOALIASES: return "noaliases"; |
682 | 682 | case RES_USE_INET6: return "inet6"; |
| 683 | case RES_USE_INET4: return "inet4"; |
683 | 684 | #ifdef RES_USE_EDNS0 /*%< KAME extension */ |
684 | 685 | case RES_USE_EDNS0: return "edns0"; |
685 | 686 | case RES_NSID: return "nsid"; |
diff --git a/src/kits/network/libbind/resolv/res_init.c b/src/kits/network/libbind/resolv/res_init.c
index b96d851..213e8d9 100644
a
|
b
|
res_setoptions(res_state statp, const char *options, const char *source)
|
594 | 594 | statp->options |= RES_NOTLDQUERY; |
595 | 595 | } else if (!strncmp(cp, "inet6", sizeof("inet6") - 1)) { |
596 | 596 | statp->options |= RES_USE_INET6; |
| 597 | } else if (!strncmp(cp, "inet4", sizeof("inet4") - 1)) { |
| 598 | statp->options |= RES_USE_INET4; |
597 | 599 | } else if (!strncmp(cp, "rotate", sizeof("rotate") - 1)) { |
598 | 600 | statp->options |= RES_ROTATE; |
599 | 601 | } else if (!strncmp(cp, "no-check-names", |