CVS commit: src/sys/dev/pci

2020-11-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Nov 19 02:36:30 UTC 2020

Modified Files:
src/sys/dev/pci: if_wm.c

Log Message:
 Add some sysctl values for debugging TX/RX queues.


To generate a diff of this commit:
cvs rdiff -u -r1.696 -r1.697 src/sys/dev/pci/if_wm.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci

2020-11-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Nov 19 02:36:30 UTC 2020

Modified Files:
src/sys/dev/pci: if_wm.c

Log Message:
 Add some sysctl values for debugging TX/RX queues.


To generate a diff of this commit:
cvs rdiff -u -r1.696 -r1.697 src/sys/dev/pci/if_wm.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/if_wm.c
diff -u src/sys/dev/pci/if_wm.c:1.696 src/sys/dev/pci/if_wm.c:1.697
--- src/sys/dev/pci/if_wm.c:1.696	Mon Nov 16 11:54:10 2020
+++ src/sys/dev/pci/if_wm.c	Thu Nov 19 02:36:30 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wm.c,v 1.696 2020/11/16 11:54:10 rin Exp $	*/
+/*	$NetBSD: if_wm.c,v 1.697 2020/11/19 02:36:30 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -82,7 +82,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.696 2020/11/16 11:54:10 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.697 2020/11/19 02:36:30 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -481,6 +481,7 @@ struct wm_queue {
 
 	struct wm_txqueue wmq_txq;
 	struct wm_rxqueue wmq_rxq;
+	char sysctlname[32];		/* Name for sysctl */
 
 	bool wmq_txrx_use_workqueue;
 	struct work wmq_cookie;
@@ -5886,8 +5887,8 @@ static void
 wm_init_sysctls(struct wm_softc *sc)
 {
 	struct sysctllog **log;
-	const struct sysctlnode *rnode, *cnode;
-	int rv;
+	const struct sysctlnode *rnode, *qnode, *cnode;
+	int i, rv;
 	const char *dvname;
 
 	log = >sc_sysctllog;
@@ -5906,6 +5907,40 @@ wm_init_sysctls(struct wm_softc *sc)
 	if (rv != 0)
 		goto teardown;
 
+	for (i = 0; i < sc->sc_nqueues; i++) {
+		struct wm_queue *wmq = >sc_queue[i];
+		struct wm_txqueue *txq = >wmq_txq;
+		struct wm_rxqueue *rxq = >wmq_rxq;
+
+		snprintf(sc->sc_queue[i].sysctlname,
+		sizeof(sc->sc_queue[i].sysctlname), "q%d", i);
+
+		if (sysctl_createv(log, 0, , ,
+		0, CTLTYPE_NODE,
+		sc->sc_queue[i].sysctlname, SYSCTL_DESCR("Queue Name"),
+		NULL, 0, NULL, 0, CTL_CREATE, CTL_EOL) != 0)
+			break;
+		if (sysctl_createv(log, 0, , ,
+		CTLFLAG_READONLY, CTLTYPE_INT,
+		"txq_free", SYSCTL_DESCR("TX queue free"),
+		NULL, 0, >txq_free,
+		0, CTL_CREATE, CTL_EOL) != 0)
+			break;
+		if (sysctl_createv(log, 0, , ,
+		CTLFLAG_READONLY, CTLTYPE_INT,
+		"txq_next", SYSCTL_DESCR("TX queue next"),
+		NULL, 0, >txq_next,
+		0, CTL_CREATE, CTL_EOL) != 0)
+			break;
+
+		if (sysctl_createv(log, 0, , ,
+		CTLFLAG_READONLY, CTLTYPE_INT,
+		"rxq_ptr", SYSCTL_DESCR("RX queue pointer"),
+		NULL, 0, >rxq_ptr,
+		0, CTL_CREATE, CTL_EOL) != 0)
+			break;
+	}
+
 #ifdef WM_DEBUG
 	rv = sysctl_createv(log, 0, , , CTLFLAG_READWRITE,
 	CTLTYPE_INT, "debug_flags",



CVS commit: src/sys/dev/pci/ixgbe

2020-11-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Nov 19 02:23:24 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.h

Log Message:
 Add comment.


To generate a diff of this commit:
cvs rdiff -u -r1.72 -r1.73 src/sys/dev/pci/ixgbe/ixgbe.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/ixgbe/ixgbe.h
diff -u src/sys/dev/pci/ixgbe/ixgbe.h:1.72 src/sys/dev/pci/ixgbe/ixgbe.h:1.73
--- src/sys/dev/pci/ixgbe/ixgbe.h:1.72	Tue Nov 17 04:50:29 2020
+++ src/sys/dev/pci/ixgbe/ixgbe.h	Thu Nov 19 02:23:24 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.h,v 1.72 2020/11/17 04:50:29 knakahara Exp $ */
+/* $NetBSD: ixgbe.h,v 1.73 2020/11/19 02:23:24 msaitoh Exp $ */
 
 /**
   SPDX-License-Identifier: BSD-3-Clause
@@ -331,8 +331,8 @@ struct ix_queue {
 	struct evcnt irqs;		/* Hardware interrupt */
 	struct evcnt handleq;	/* software_interrupt */
 	struct evcnt req;		/* deferred */
-	char namebuf[32];
-	char evnamebuf[32];
+	char namebuf[32];	/* Name for sysctl */
+	char evnamebuf[32];	/* Name for evcnt */
 
 	/* Lock for disabled_count and this queue's EIMS/EIMC bit */
 	kmutex_t dc_mtx;



CVS commit: src/sys/dev/pci/ixgbe

2020-11-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Nov 19 02:23:24 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.h

Log Message:
 Add comment.


To generate a diff of this commit:
cvs rdiff -u -r1.72 -r1.73 src/sys/dev/pci/ixgbe/ixgbe.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/elftoolchain/dist/common

2020-11-18 Thread Joseph Koshy
Module Name:src
Committed By:   jkoshy
Date:   Wed Nov 18 22:23:05 UTC 2020

Modified Files:
src/external/bsd/elftoolchain/dist/common: utarray.h uthash.h

Log Message:
Sync 'utarray.h' and 'uthash.h' with elftoolchain revision [r3891].

This change upgrades these files to UT{HASH,ARRAY}_VERSION 2.1.0.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/elftoolchain/dist/common/utarray.h \
src/external/bsd/elftoolchain/dist/common/uthash.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/elftoolchain/dist/common/utarray.h
diff -u src/external/bsd/elftoolchain/dist/common/utarray.h:1.2 src/external/bsd/elftoolchain/dist/common/utarray.h:1.3
--- src/external/bsd/elftoolchain/dist/common/utarray.h:1.2	Sun Mar  9 16:58:03 2014
+++ src/external/bsd/elftoolchain/dist/common/utarray.h	Wed Nov 18 22:23:05 2020
@@ -1,7 +1,7 @@
-/*	$NetBSD: utarray.h,v 1.2 2014/03/09 16:58:03 christos Exp $	*/
+/*	$NetBSD: utarray.h,v 1.3 2020/11/18 22:23:05 jkoshy Exp $	*/
 
 /*
-Copyright (c) 2008-2013, Troy D. Hanson   http://uthash.sourceforge.net
+Copyright (c) 2008-2018, Troy D. Hanson   http://troydhanson.github.com/uthash/
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
@@ -23,28 +23,30 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY 
 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
-/* Id: utarray.h 2694 2012-11-24 17:11:58Z kaiwang27  */
-
-/* a dynamic array implementation using macros 
- * see http://uthash.sourceforge.net/utarray
+/* a dynamic array implementation using macros
  */
 #ifndef UTARRAY_H
 #define UTARRAY_H
 
-#define UTARRAY_VERSION 1.9.7
+#define UTARRAY_VERSION 2.1.0
+
+#include   /* size_t */
+#include   /* memset, etc */
+#include   /* exit */
 
 #ifdef __GNUC__
-#define _UNUSED_ __attribute__ ((__unused__)) 
+#define UTARRAY_UNUSED __attribute__((__unused__))
 #else
-#define _UNUSED_ 
+#define UTARRAY_UNUSED
 #endif
 
-#include   /* size_t */
-#include   /* memset, etc */
-#include   /* exit */
+#ifdef oom
+#error "The name of macro 'oom' has been changed to 'utarray_oom'. Please update your code."
+#define utarray_oom() oom()
+#endif
 
-#ifndef oom
-#define oom() exit(-1)
+#ifndef utarray_oom
+#define utarray_oom() exit(-1)
 #endif
 
 typedef void (ctor_f)(void *dst, const void *src);
@@ -65,13 +67,13 @@ typedef struct {
 
 #define utarray_init(a,_icd) do { \
   memset(a,0,sizeof(UT_array));   \
-  (a)->icd=*_icd; \
+  (a)->icd = *(_icd); \
 } while(0)
 
 #define utarray_done(a) do {  \
   if ((a)->n) {   \
 if ((a)->icd.dtor) {  \
-  size_t _ut_i;   \
+  unsigned _ut_i; \
   for(_ut_i=0; _ut_i < (a)->i; _ut_i++) { \
 (a)->icd.dtor(utarray_eltptr(a,_ut_i));   \
   }   \
@@ -82,7 +84,10 @@ typedef struct {
 } while(0)
 
 #define utarray_new(a,_icd) do {  \
-  a=(UT_array*)malloc(sizeof(UT_array));  \
+  (a) = (UT_array*)malloc(sizeof(UT_array));  \
+  if ((a) == NULL) {  \
+utarray_oom();\
+  }   \
   utarray_init(a,_icd);   \
 } while(0)
 
@@ -92,9 +97,14 @@ typedef struct {
 } while(0)
 
 #define utarray_reserve(a,by) do {\
-  if (((a)->i+by) > ((a)->n)) {   \
-while(((a)->i+by) > ((a)->n)) { (a)->n = ((a)->n ? (2*(a)->n) : 8); } \
-if ( ((a)->d=(char*)realloc((a)->d, (a)->n*(a)->icd.sz)) == NULL) oom();  \
+  if (((a)->i+(by)) > (a)->n) {   \
+char *utarray_tmp;\
+while (((a)->i+(by)) > (a)->n) { (a)->n = ((a)->n ? (2*(a)->n) : 8); }\
+utarray_tmp=(char*)realloc((a)->d, (a)->n*(a)->icd.sz);   \
+if (utarray_tmp == NULL) {\
+  utarray_oom();  \
+}  

CVS commit: src/external/bsd/elftoolchain/dist/common

2020-11-18 Thread Joseph Koshy
Module Name:src
Committed By:   jkoshy
Date:   Wed Nov 18 22:23:05 UTC 2020

Modified Files:
src/external/bsd/elftoolchain/dist/common: utarray.h uthash.h

Log Message:
Sync 'utarray.h' and 'uthash.h' with elftoolchain revision [r3891].

This change upgrades these files to UT{HASH,ARRAY}_VERSION 2.1.0.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/elftoolchain/dist/common/utarray.h \
src/external/bsd/elftoolchain/dist/common/uthash.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/ktrace

2020-11-18 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Nov 18 20:00:15 UTC 2020

Modified Files:
src/usr.bin/ktrace: ktrace.1

Log Message:
Sort options.

Prompted by pgoyette.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/usr.bin/ktrace/ktrace.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/ktrace

2020-11-18 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Nov 18 20:00:15 UTC 2020

Modified Files:
src/usr.bin/ktrace: ktrace.1

Log Message:
Sort options.

Prompted by pgoyette.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/usr.bin/ktrace/ktrace.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/ktrace/ktrace.1
diff -u src/usr.bin/ktrace/ktrace.1:1.45 src/usr.bin/ktrace/ktrace.1:1.46
--- src/usr.bin/ktrace/ktrace.1:1.45	Sun Mar 29 17:50:23 2020
+++ src/usr.bin/ktrace/ktrace.1	Wed Nov 18 20:00:15 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: ktrace.1,v 1.45 2020/03/29 17:50:23 sevan Exp $
+.\"	$NetBSD: ktrace.1,v 1.46 2020/11/18 20:00:15 wiz Exp $
 .\"
 .\" Copyright (c) 1990, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -110,6 +110,10 @@ Clear the trace points associated with t
 .It Fl d
 Descendants; perform the operation for all current children of the
 designated processes.
+.It Fl e Ar emulation
+If an emulation of a process is unknown,
+interpret system call maps assuming the named emulation instead of
+default "netbsd".
 .It Fl f Ar trfile
 Log trace records to
 .Ar trfile
@@ -160,10 +164,10 @@ readable format to standard out.
 Enable (disable) tracing on the indicated process id (only one
 .Fl p
 flag is permitted).
-.It Fl s
-Write to the trace file with synchronized I/O.
 .It Fl R
 Display relative time stamps to output.
+.It Fl s
+Write to the trace file with synchronized I/O.
 .It Fl T
 Same as the
 .Fl R
@@ -205,14 +209,6 @@ trace the default set of trace points (c
 .It Cm -
 do not trace following trace points
 .El
-.It Fl e Ar emulation
-If an emulation of a process is unknown,
-interpret system call maps assuming the named emulation instead of
-default "netbsd".
-.It Ar command
-Execute
-.Ar command
-with the specified trace flags.
 .It Fl v Ar version
 Determines the
 .Ar version
@@ -220,6 +216,10 @@ of the file generated.
 Version 0 is the compatible ktrace format, and
 version 1 is the new format with lwp IDs and nanosecond (instead of
 microsecond) timestamps.
+.It Ar command
+Execute
+.Ar command
+with the specified trace flags.
 .El
 .Pp
 The



CVS commit: src/sys/arch/x86/x86

2020-11-18 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Nov 18 16:36:43 UTC 2020

Modified Files:
src/sys/arch/x86/x86: intr.c

Log Message:
Preserve Xen SIR slots for VM_GUEST_XENPVH.


To generate a diff of this commit:
cvs rdiff -u -r1.152 -r1.153 src/sys/arch/x86/x86/intr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x86/x86/intr.c
diff -u src/sys/arch/x86/x86/intr.c:1.152 src/sys/arch/x86/x86/intr.c:1.153
--- src/sys/arch/x86/x86/intr.c:1.152	Tue Jul 14 00:45:53 2020
+++ src/sys/arch/x86/x86/intr.c	Wed Nov 18 16:36:43 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.c,v 1.152 2020/07/14 00:45:53 yamaguchi Exp $	*/
+/*	$NetBSD: intr.c,v 1.153 2020/11/18 16:36:43 bouyer Exp $	*/
 
 /*
  * Copyright (c) 2007, 2008, 2009, 2019 The NetBSD Foundation, Inc.
@@ -133,7 +133,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.152 2020/07/14 00:45:53 yamaguchi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.153 2020/11/18 16:36:43 bouyer Exp $");
 
 #include "opt_intrdebug.h"
 #include "opt_multiprocessor.h"
@@ -450,16 +450,20 @@ intr_allocate_slot_cpu(struct cpu_info *
 		slot = pin;
 	} else {
 		int start = 0;
+		int max = MAX_INTR_SOURCES;
 		slot = -1;
 
 		/* avoid reserved slots for legacy interrupts. */
 		if (CPU_IS_PRIMARY(ci) && msipic_is_msi_pic(pic))
 			start = NUM_LEGACY_IRQS;
+		/* don't step over Xen's slots */
+		if (vm_guest == VM_GUEST_XENPVH)
+			max = SIR_XENIPL_VM; 
 		/*
 		 * intr_allocate_slot has checked for an existing mapping.
 		 * Now look for a free slot.
 		 */
-		for (i = start; i < MAX_INTR_SOURCES ; i++) {
+		for (i = start; i < max ; i++) {
 			if (ci->ci_isources[i] == NULL) {
 slot = i;
 break;



CVS commit: src/sys/arch/x86/x86

2020-11-18 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Nov 18 16:36:43 UTC 2020

Modified Files:
src/sys/arch/x86/x86: intr.c

Log Message:
Preserve Xen SIR slots for VM_GUEST_XENPVH.


To generate a diff of this commit:
cvs rdiff -u -r1.152 -r1.153 src/sys/arch/x86/x86/intr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/amd64/include

2020-11-18 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Wed Nov 18 16:13:34 UTC 2020

Modified Files:
src/sys/arch/amd64/include: msan.h

Log Message:
Make this at least compile.
Looks like a missing part from "Round of uvm.h cleanup (2020-09-05 18:30)".


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/amd64/include/msan.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/amd64/include/msan.h
diff -u src/sys/arch/amd64/include/msan.h:1.5 src/sys/arch/amd64/include/msan.h:1.6
--- src/sys/arch/amd64/include/msan.h:1.5	Wed Sep  9 16:29:59 2020
+++ src/sys/arch/amd64/include/msan.h	Wed Nov 18 16:13:34 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: msan.h,v 1.5 2020/09/09 16:29:59 maxv Exp $	*/
+/*	$NetBSD: msan.h,v 1.6 2020/11/18 16:13:34 hannken Exp $	*/
 
 /*
  * Copyright (c) 2019-2020 Maxime Villard, m00nbsd.net
@@ -30,6 +30,8 @@
 
 #include 
 
+#include 
+
 #include 
 #include 
 



CVS commit: src/sys/arch/amd64/include

2020-11-18 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Wed Nov 18 16:13:34 UTC 2020

Modified Files:
src/sys/arch/amd64/include: msan.h

Log Message:
Make this at least compile.
Looks like a missing part from "Round of uvm.h cleanup (2020-09-05 18:30)".


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/amd64/include/msan.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src

2020-11-18 Thread Ignatios Souvatzis
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
 (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 
 #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, ,
 	   "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),



CVS commit: src

2020-11-18 Thread Ignatios Souvatzis
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
 (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.