summaryrefslogtreecommitdiff
path: root/lib/libc/net/getaddrinfo.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/net/getaddrinfo.c')
-rw-r--r--lib/libc/net/getaddrinfo.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libc/net/getaddrinfo.c b/lib/libc/net/getaddrinfo.c
index 1326473fb74..0a0b112589d 100644
--- a/lib/libc/net/getaddrinfo.c
+++ b/lib/libc/net/getaddrinfo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: getaddrinfo.c,v 1.27 2000/08/31 17:41:51 itojun Exp $ */
+/* $OpenBSD: getaddrinfo.c,v 1.28 2001/06/11 10:05:58 itojun Exp $ */
/* $KAME: getaddrinfo.c,v 1.31 2000/08/31 17:36:43 itojun Exp $ */
/*
@@ -1511,6 +1511,7 @@ _yp_getaddrinfo(name, pai)
extern const char *__hostalias __P((const char *));
extern int h_errno;
+extern int res_opt __P((int, u_char *, int, int));
/*
* Formulate a normal query, send, and await answer.
@@ -1562,6 +1563,8 @@ res_queryN(name, target)
n = res_mkquery(QUERY, name, class, type, NULL, 0, NULL,
buf, sizeof(buf));
+ if (n > 0 && (_res.options & RES_USE_EDNS0) != 0)
+ n = res_opt(n, buf, sizeof(buf), anslen);
if (n <= 0) {
#ifdef DEBUG
if (_res.options & RES_DEBUG)