diff options
-rw-r--r-- | lib/libc/net/gethostnamadr.c | 5 | ||||
-rw-r--r-- | lib/libc/net/resolver.3 | 8 | ||||
-rw-r--r-- | share/man/man5/resolv.conf.5 | 6 |
3 files changed, 12 insertions, 7 deletions
diff --git a/lib/libc/net/gethostnamadr.c b/lib/libc/net/gethostnamadr.c index 13a8eef8468..bdb37292189 100644 --- a/lib/libc/net/gethostnamadr.c +++ b/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 <sys/param.h> @@ -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) { diff --git a/lib/libc/net/resolver.3 b/lib/libc/net/resolver.3 index 27d393193d3..9b2471d823f 100644 --- a/lib/libc/net/resolver.3 +++ b/lib/libc/net/resolver.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: resolver.3,v 1.12 1999/07/05 04:41:00 aaron Exp $ +.\" $OpenBSD: resolver.3,v 1.13 2000/01/03 11:51:08 itojun Exp $ .\" .\" Copyright (c) 1985, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -171,7 +171,11 @@ This is used by the standard host lookup routine .Xr gethostbyname 3 . This option is enabled by default. .It Dv RES_USE_INET6 -Enable support for IPv6 addresses. +Enables support for IPv6-only applications. +This causes IPv4 addresses to be returned as an IPv4 mapped address. +For example, 10.1.1.1 will be returned as ::ffff:10.1.1.1. +The option is not meaningful on +.Ox . .El .Pp The diff --git a/share/man/man5/resolv.conf.5 b/share/man/man5/resolv.conf.5 index f4537e7dc4b..78915ea935b 100644 --- a/share/man/man5/resolv.conf.5 +++ b/share/man/man5/resolv.conf.5 @@ -1,4 +1,4 @@ -.\" $OpenBSD: resolv.conf.5,v 1.9 1999/05/23 14:11:05 aaron Exp $ +.\" $OpenBSD: resolv.conf.5,v 1.10 2000/01/03 11:51:08 itojun Exp $ .\" $NetBSD: resolv.conf.5,v 1.7 1996/03/06 18:22:16 scottr Exp $ .\" .\" Copyright (c) 1986, 1991 The Regents of the University of California. @@ -166,9 +166,11 @@ where option is one of the following: .It Sy debug Sets RES_DEBUG in _res.options. .It Sy inet6 -Enables support for IPv6 addresses, by setting RES_USE_INET6 in +Enables support for IPv6-only applications, by setting RES_USE_INET6 in _res.options (see .Xr resolver 3 ) . +Use of this option is discouraged, and meaningless on +.Ox . .It Sy ndots:n Sets a threshold for the number of dots which must appear in a name given to res_query (see |