From e4c761043a1549e36e2e3f08aa44ca103b28ef51 Mon Sep 17 00:00:00 2001 From: itojun <> Date: Mon, 3 Jan 2000 11:51:08 +0000 Subject: always enable IPv6 address in /etc/hosts (via _gethtent()). clarify RES_USE_INET6. the use of this bit is not meaningful on openbsd (as we don't have mapped addr support in kernel). --- src/lib/libc/net/gethostnamadr.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/lib/libc/net/gethostnamadr.c') diff --git a/src/lib/libc/net/gethostnamadr.c b/src/lib/libc/net/gethostnamadr.c index 13a8eef846..bdb3729218 100644 --- a/src/lib/libc/net/gethostnamadr.c +++ b/src/lib/libc/net/gethostnamadr.c @@ -52,7 +52,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: gethostnamadr.c,v 1.39 1999/12/11 08:40:17 itojun Exp $"; +static char rcsid[] = "$OpenBSD: gethostnamadr.c,v 1.40 2000/01/03 11:51:07 itojun Exp $"; #endif /* LIBC_SCCS and not lint */ #include @@ -825,8 +825,7 @@ _gethtent() if (!(cp = strpbrk(p, " \t"))) goto again; *cp++ = '\0'; - if ((_res.options & RES_USE_INET6) && - inet_pton(AF_INET6, p, host_addr) > 0) { + if (inet_pton(AF_INET6, p, host_addr) > 0) { af = AF_INET6; len = IN6ADDRSZ; } else if (inet_pton(AF_INET, p, host_addr) > 0) { -- cgit v1.2.3-55-g6feb