[6bone] glibc fix -> here <-

Todd T. Fries todd@fries.net
Mon, 29 Jul 2002 09:34:19 -0500


Home net is down, apoligies for mailing the list, but here's your glibc
fix adapted from KAME/NetBSD/OpenBSD applied against the latest tarball of
glibc I could find (2.2.5):


--- ChangeLog.orig	Mon Jul 29 09:32:36 2002
+++ ChangeLog	Mon Jul 29 09:34:07 2002
@@ -1,3 +1,8 @@
+2002-06-29  Todd Fries <todd@openbsd.org>
+
+	* resolv/gethnamaddr.c: try ip6.int if ip6.arpa fails; code adapted
+	from KAME/NetBSD/OpenBSD libc.
+
 2002-01-18  Andreas Schwab  <schwab@suse.de>
 
 	* sysdeps/unix/sysv/linux/configure.in

--- gethnamaddr.c.orig	Fri Oct 26 18:49:48 2001
+++ gethnamaddr.c	Mon Jul 29 09:28:10 2002
@@ -696,6 +696,11 @@
 		abort();
 	}
 	n = res_nquery(&_res, qbuf, C_IN, T_PTR, (u_char *)buf.buf, sizeof buf.buf);
+	if (n < 0 && af == AF_INET6) {
+		strcpy(qp, "ip6.int");
+		n = res_nquery(&_res, qbuf, C_IN, T_PTR, (u_char *)buf.buf, sizeof buf.buf);
+	}
+		
 	if (n < 0) {
 		dprintf("res_nquery failed (%d)\n", n);
 		if (errno == ECONNREFUSED)
-- 
Todd Fries .. todd@fries.net

(last updated $ToddFries: signature.p,v 1.2 2002/03/19 15:10:18 todd Exp $)