Module Name: src
Committed By: is
Date: Wed Nov 18 12:49:52 UTC 2020
Modified Files:
src/include/arpa: nameser_compat.h
src/lib/libc/net: getaddrinfo.c gethnamaddr.c
Log Message:
Don't complain about additional DNAME records received when resolving A or
AAAA (like already done for SIG/KEY and CNAME).
To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/include/arpa/nameser_compat.h
cvs rdiff -u -r1.119 -r1.120 src/lib/libc/net/getaddrinfo.c
cvs rdiff -u -r1.92 -r1.93 src/lib/libc/net/gethnamaddr.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/include/arpa/nameser_compat.h
diff -u src/include/arpa/nameser_compat.h:1.7 src/include/arpa/nameser_compat.h:1.8
--- src/include/arpa/nameser_compat.h:1.7 Sun Jun 28 02:16:19 2020
+++ src/include/arpa/nameser_compat.h Wed Nov 18 12:49:52 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: nameser_compat.h,v 1.7 2020/06/28 02:16:19 gutteridge Exp $ */
+/* $NetBSD: nameser_compat.h,v 1.8 2020/11/18 12:49:52 is Exp $ */
/* Copyright (c) 1983, 1989
* The Regents of the University of California. All rights reserved.
@@ -210,6 +210,7 @@ typedef struct {
#define T_ATMA ns_t_atma
#define T_NAPTR ns_t_naptr
#define T_A6 ns_t_a6
+#define T_DNAME ns_t_dname
#define T_TSIG ns_t_tsig
#define T_IXFR ns_t_ixfr
#define T_AXFR ns_t_axfr
Index: src/lib/libc/net/getaddrinfo.c
diff -u src/lib/libc/net/getaddrinfo.c:1.119 src/lib/libc/net/getaddrinfo.c:1.120
--- src/lib/libc/net/getaddrinfo.c:1.119 Thu Dec 13 04:41:41 2018
+++ src/lib/libc/net/getaddrinfo.c Wed Nov 18 12:49:52 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: getaddrinfo.c,v 1.119 2018/12/13 04:41:41 dholland Exp $ */
+/* $NetBSD: getaddrinfo.c,v 1.120 2020/11/18 12:49:52 is Exp $ */
/* $KAME: getaddrinfo.c,v 1.29 2000/08/31 17:26:57 itojun Exp $ */
/*
@@ -55,7 +55,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: getaddrinfo.c,v 1.119 2018/12/13 04:41:41 dholland Exp $");
+__RCSID("$NetBSD: getaddrinfo.c,v 1.120 2020/11/18 12:49:52 is Exp $");
#endif /* LIBC_SCCS and not lint */
#ifndef RUMP_ACTION
@@ -1821,7 +1821,7 @@ getanswer(res_state res, const querybuf
continue;
}
} else if (type != qtype) {
- if (type != T_KEY && type != T_SIG) {
+ if (type != T_KEY && type != T_SIG && type != T_DNAME) {
struct syslog_data sd = SYSLOG_DATA_INIT;
syslog_r(LOG_NOTICE|LOG_AUTH, &sd,
"gethostby*.getanswer: asked for \"%s %s %s\", got type \"%s\"",
Index: src/lib/libc/net/gethnamaddr.c
diff -u src/lib/libc/net/gethnamaddr.c:1.92 src/lib/libc/net/gethnamaddr.c:1.93
--- src/lib/libc/net/gethnamaddr.c:1.92 Tue Sep 22 16:16:02 2015
+++ src/lib/libc/net/gethnamaddr.c Wed Nov 18 12:49:52 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: gethnamaddr.c,v 1.92 2015/09/22 16:16:02 christos Exp $ */
+/* $NetBSD: gethnamaddr.c,v 1.93 2020/11/18 12:49:52 is Exp $ */
/*
* ++Copyright++ 1985, 1988, 1993
@@ -57,7 +57,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.92 2015/09/22 16:16:02 christos Exp $");
+__RCSID("$NetBSD: gethnamaddr.c,v 1.93 2020/11/18 12:49:52 is Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -358,7 +358,7 @@ getanswer(const querybuf *answer, int an
continue;
}
if (type != qtype) {
- if (type != T_KEY && type != T_SIG)
+ if (type != T_KEY && type != T_SIG && type != T_DNAME)
syslog(LOG_NOTICE|LOG_AUTH,
"gethostby*.getanswer: asked for \"%s %s %s\", got type \"%s\"",
qname, p_class(C_IN), p_type(qtype),