Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-6]: src/lib/libc/net Pull up revision 1.48 (requested by itojun...
details: https://anonhg.NetBSD.org/src/rev/349a293aa9ed
branches: netbsd-1-6
changeset: 528635:349a293aa9ed
user: lukem <lukem%NetBSD.org@localhost>
date: Mon Jul 29 15:23:35 2002 +0000
description:
Pull up revision 1.48 (requested by itojun in ticket #569):
query ip6.arpa then ip6.int for IPv6 reverse lookup. follows RFC3152.
diffstat:
lib/libc/net/gethnamaddr.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diffs (39 lines):
diff -r 8b4047ea9f46 -r 349a293aa9ed lib/libc/net/gethnamaddr.c
--- a/lib/libc/net/gethnamaddr.c Mon Jul 29 15:22:28 2002 +0000
+++ b/lib/libc/net/gethnamaddr.c Mon Jul 29 15:23:35 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gethnamaddr.c,v 1.42.2.4 2002/07/29 15:22:28 lukem Exp $ */
+/* $NetBSD: gethnamaddr.c,v 1.42.2.5 2002/07/29 15:23:35 lukem Exp $ */
/*
* ++Copyright++ 1985, 1988, 1993
@@ -61,7 +61,7 @@
static char sccsid[] = "@(#)gethostnamadr.c 8.1 (Berkeley) 6/4/93";
static char rcsid[] = "Id: gethnamaddr.c,v 8.21 1997/06/01 20:34:37 vixie Exp ";
#else
-__RCSID("$NetBSD: gethnamaddr.c,v 1.42.2.4 2002/07/29 15:22:28 lukem Exp $");
+__RCSID("$NetBSD: gethnamaddr.c,v 1.42.2.5 2002/07/29 15:23:35 lukem Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -1200,13 +1200,19 @@
else
return NS_NOTFOUND;
}
- strlcat(qbuf, "ip6.int", sizeof(qbuf));
+ strlcat(qbuf, "ip6.arpa", sizeof(qbuf));
break;
default:
abort();
}
n = res_query(qbuf, C_IN, T_PTR, (u_char *)(void *)&buf, sizeof(buf));
+ if (n < 0 && af == AF_INET6) {
+ *qp = '\0';
+ strlcat(qbuf, "ip6.int", sizeof(qbuf));
+ n = res_query(qbuf, C_IN, T_PTR, (u_char *)(void *)&buf,
+ sizeof(buf));
+ }
if (n < 0) {
dprintf("res_query failed (%d)\n", n);
return NS_NOTFOUND;
Home |
Main Index |
Thread Index |
Old Index