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.51 (requested by itojun...



details:   https://anonhg.NetBSD.org/src/rev/28914a194858
branches:  netbsd-1-6
changeset: 529031:28914a194858
user:      lukem <lukem%NetBSD.org@localhost>
date:      Sat Aug 24 02:57:20 2002 +0000

description:
Pull up revision 1.51 (requested by itojun in ticket #718):
drop AAAA reply with IPv4 mapped address.  sync w/kame
draft-itojun-v6ops-v4mapped-harmful-00.txt

diffstat:

 lib/libc/net/gethnamaddr.c |  12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diffs (33 lines):

diff -r 04e1f5c2bd8b -r 28914a194858 lib/libc/net/gethnamaddr.c
--- a/lib/libc/net/gethnamaddr.c        Sat Aug 24 02:57:09 2002 +0000
+++ b/lib/libc/net/gethnamaddr.c        Sat Aug 24 02:57:20 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: gethnamaddr.c,v 1.42.2.7 2002/08/17 15:55:37 lukem Exp $       */
+/*     $NetBSD: gethnamaddr.c,v 1.42.2.8 2002/08/24 02:57:20 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.7 2002/08/17 15:55:37 lukem Exp $");
+__RCSID("$NetBSD: gethnamaddr.c,v 1.42.2.8 2002/08/24 02:57:20 lukem Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -446,6 +446,14 @@
                                cp += n;
                                continue;
                        }
+                       if (type == T_AAAA) {
+                               struct in6_addr in6;
+                               memcpy(&in6, cp, IN6ADDRSZ);
+                               if (IN6_IS_ADDR_V4MAPPED(&in6)) {
+                                       cp += n;
+                                       continue;
+                               }
+                       }
                        if (!haveanswer) {
                                int nn;
 



Home | Main Index | Thread Index | Old Index