diff options
author | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2004-07-29 03:09:41 +0000 |
---|---|---|
committer | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2004-07-29 03:09:41 +0000 |
commit | b0b90b2cd84ce29b4bdddc1519c0aa07e6bc0b9d (patch) | |
tree | 67863336a843890dec168c5e29aa66eb1e6f8fe4 /lib/libc | |
parent | fd519076a69e1aafcf72877aa64237432c24d97e (diff) |
we no longer need to query ip6.int for reverse lookup. pvalchev ok
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/net/gethostnamadr.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/libc/net/gethostnamadr.c b/lib/libc/net/gethostnamadr.c index ee4af361913..0a42d0a27ea 100644 --- a/lib/libc/net/gethostnamadr.c +++ b/lib/libc/net/gethostnamadr.c @@ -48,7 +48,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static const char rcsid[] = "$OpenBSD: gethostnamadr.c,v 1.59 2003/10/06 19:18:09 millert Exp $"; +static const char rcsid[] = "$OpenBSD: gethostnamadr.c,v 1.60 2004/07/29 03:09:40 itojun Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> @@ -709,6 +709,7 @@ gethostbyaddr(const char *addr, int len, int af) } qp += i; } + strlcpy(qp, "ip6.arpa", ep - qp); break; } @@ -727,18 +728,11 @@ gethostbyaddr(const char *addr, int len, int af) break; #endif case 'b': - if (af == AF_INET6) - strlcpy(qp, "ip6.arpa", ep - qp); buf = malloc(sizeof(*buf)); if (!buf) break; n = res_query(qbuf, C_IN, T_PTR, buf->buf, sizeof(buf->buf)); - if (n < 0 && af == AF_INET6) { - strlcpy(qp, "ip6.int", ep - qp); - n = res_query(qbuf, C_IN, T_PTR, - buf->buf, sizeof(buf->buf)); - } if (n < 0) { free(buf); #ifdef DEBUG |