aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/net
diff options
context:
space:
mode:
authorBill Paul <wpaul@FreeBSD.org>1996-12-24 02:10:24 +0000
committerBill Paul <wpaul@FreeBSD.org>1996-12-24 02:10:24 +0000
commit6b73680dcfa2adab01b30afdd158e8f0157a66ef (patch)
treecfce9912d4c66d2d89777ca40062d8f6f2c30d35 /lib/libc/net
parent03b1ba77c3803562e718985db1fb542b022467aa (diff)
Notes
Diffstat (limited to 'lib/libc/net')
-rw-r--r--lib/libc/net/gethostbydns.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/libc/net/gethostbydns.c b/lib/libc/net/gethostbydns.c
index 573ba3432095..415bc4914cfa 100644
--- a/lib/libc/net/gethostbydns.c
+++ b/lib/libc/net/gethostbydns.c
@@ -53,7 +53,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)gethostnamadr.c 8.1 (Berkeley) 6/4/93";
-static char rcsid[] = "$Id: gethostbydns.c,v 1.12 1996/11/01 06:25:43 peter Exp $";
+static char rcsid[] = "$Id: gethostbydns.c,v 1.13 1996/12/22 22:05:43 wpaul Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@@ -404,6 +404,19 @@ __dns_getanswer(answer, anslen, qname, qtype)
const char *qname;
int qtype;
{
+ switch(qtype) {
+ case T_AAAA:
+ host.h_addrtype = AF_INET6;
+ host.h_length = IN6ADDRSZ;
+ break;
+ case T_A:
+ default:
+ host.h_addrtype = AF_INET;
+ host.h_length = INADDRSZ;
+ break;
+ return(NULL);
+ }
+
return(gethostanswer((const querybuf *)answer, anslen, qname, qtype));
}