drop AAAA reply with IPv4 mapped address. sync w/kame
draft-itojun-v6ops-v4mapped-harmful-00.txt
This commit is contained in:
parent
510b31be28
commit
949583590f
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: getaddrinfo.c,v 1.61 2002/07/01 22:05:08 itojun Exp $ */
|
||||
/* $NetBSD: getaddrinfo.c,v 1.62 2002/08/22 16:32:14 itojun Exp $ */
|
||||
/* $KAME: getaddrinfo.c,v 1.29 2000/08/31 17:26:57 itojun Exp $ */
|
||||
|
||||
/*
|
||||
@ -79,7 +79,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
__RCSID("$NetBSD: getaddrinfo.c,v 1.61 2002/07/01 22:05:08 itojun Exp $");
|
||||
__RCSID("$NetBSD: getaddrinfo.c,v 1.62 2002/08/22 16:32:14 itojun Exp $");
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include "namespace.h"
|
||||
@ -1262,6 +1262,14 @@ getanswer(answer, anslen, qname, qtype, pai)
|
||||
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;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: gethnamaddr.c,v 1.50 2002/08/16 21:54:00 itojun Exp $ */
|
||||
/* $NetBSD: gethnamaddr.c,v 1.51 2002/08/22 16:32:14 itojun 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.50 2002/08/16 21:54:00 itojun Exp $");
|
||||
__RCSID("$NetBSD: gethnamaddr.c,v 1.51 2002/08/22 16:32:14 itojun Exp $");
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
@ -441,6 +441,14 @@ getanswer(answer, anslen, qname, qtype)
|
||||
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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user