aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2022-11-07 15:48:11 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2022-11-14 11:23:32 +0000
commit48aa2fa71b2d08bf65278c404325e6df419db49e (patch)
treeb5b8ef747275977bc131e0347be9f2de5870bc0b
parentd488e8d0372d5c79fb2cb1aa6c41a59fbfb62479 (diff)
downloadsrc-48aa2fa71b2d08bf65278c404325e6df419db49e.tar.gz
src-48aa2fa71b2d08bf65278c404325e6df419db49e.zip
libc: Don't warn about RRSIG replies.
PR: 213178 MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D37303 (cherry picked from commit 817f1f3064db25f821032c8fffb131183206bba1)
-rw-r--r--include/arpa/nameser_compat.h18
-rw-r--r--lib/libc/net/getaddrinfo.c2
-rw-r--r--lib/libc/net/gethostbydns.c5
3 files changed, 23 insertions, 2 deletions
diff --git a/include/arpa/nameser_compat.h b/include/arpa/nameser_compat.h
index 7562984ab0ff..d70bc199b823 100644
--- a/include/arpa/nameser_compat.h
+++ b/include/arpa/nameser_compat.h
@@ -177,15 +177,33 @@ typedef struct {
#define T_SRV ns_t_srv
#define T_ATMA ns_t_atma
#define T_NAPTR ns_t_naptr
+#define T_KX ns_t_kx
+#define T_CERT ns_t_cert
#define T_A6 ns_t_a6
#define T_DNAME ns_t_dname
+#define T_SINK ns_t_sink
#define T_OPT ns_t_opt
+#define T_APL ns_t_apl
+#define T_DS ns_t_ds
+#define T_SSHFP ns_t_sshfp
+#define T_IPSECKEY ns_t_ipseckey
+#define T_RRSIG ns_t_rrsig
+#define T_NSEC ns_t_nsec
+#define T_DNSKEY ns_t_dnskey
+#define T_DHCID ns_t_dhcid
+#define T_NSEC3 ns_t_nsec3
+#define T_NSEC3PARAM ns_t_nsec3param
+#define T_HIP ns_t_hip
+#define T_SPF ns_t_spf
+#define T_TKEY ns_t_tkey
#define T_TSIG ns_t_tsig
#define T_IXFR ns_t_ixfr
#define T_AXFR ns_t_axfr
#define T_MAILB ns_t_mailb
#define T_MAILA ns_t_maila
#define T_ANY ns_t_any
+#define T_ZXFR ns_t_zxfr
+#define T_DLV ns_t_dlv
#define C_IN ns_c_in
#define C_CHAOS ns_c_chaos
diff --git a/lib/libc/net/getaddrinfo.c b/lib/libc/net/getaddrinfo.c
index a33f240bc376..abe4eb17cf72 100644
--- a/lib/libc/net/getaddrinfo.c
+++ b/lib/libc/net/getaddrinfo.c
@@ -2091,7 +2091,7 @@ getanswer(const querybuf *answer, int anslen, const char *qname, int qtype,
} else if (type != qtype) {
#ifdef DEBUG
if (type != T_KEY && type != T_SIG &&
- type != ns_t_dname)
+ type != T_DNAME && type != T_RRSIG)
syslog(LOG_NOTICE|LOG_AUTH,
"gethostby*.getanswer: asked for \"%s %s %s\", got type \"%s\"",
qname, p_class(C_IN), p_type(qtype),
diff --git a/lib/libc/net/gethostbydns.c b/lib/libc/net/gethostbydns.c
index 09800b874f90..142b67f7ace9 100644
--- a/lib/libc/net/gethostbydns.c
+++ b/lib/libc/net/gethostbydns.c
@@ -292,11 +292,14 @@ gethostanswer(const querybuf *answer, int anslen, const char *qname, int qtype,
continue;
}
if (type != qtype) {
- if (type != T_SIG && type != ns_t_dname)
+#ifdef DEBUG
+ if (type != T_KEY && type != T_SIG &&
+ type != T_DNAME && type != T_RRSIG)
syslog(LOG_NOTICE|LOG_AUTH,
"gethostby*.gethostanswer: asked for \"%s %s %s\", got type \"%s\"",
qname, p_class(C_IN), p_type(qtype),
p_type(type));
+#endif
cp += n;
continue; /* XXX - had_error++ ? */
}