From robert@fledge.watson.org  Tue Jul 21 10:33:29 1998
Received: from fledge.watson.org (robert@COPLAND.CODA.CS.CMU.EDU [128.2.222.48])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA02796
          for <FreeBSD-gnats-submit@freebsd.org>; Tue, 21 Jul 1998 10:33:28 -0700 (PDT)
          (envelope-from robert@fledge.watson.org)
Received: (from robert@localhost)
	by fledge.watson.org (8.8.8/8.8.8) id NAA12061;
	Tue, 21 Jul 1998 13:33:06 -0400 (EDT)
Message-Id: <199807211733.NAA12061@fledge.watson.org>
Date: Tue, 21 Jul 1998 13:33:06 -0400 (EDT)
From: robert@cyrus.watson.org
Reply-To: robert+freebsd@cyrus.watson.org
To: FreeBSD-gnats-submit@freebsd.org
Subject: Patches to stop warnings from libc when using DNSsec
X-Send-Pr-Version: 3.2

>Number:         7352
>Category:       bin
>Synopsis:       libc generates spurious warnings when used with DNSsec
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jul 21 10:40:01 PDT 1998
>Closed-Date:    Mon Dec 27 23:22:09 PST 1999
>Last-Modified:  Mon Dec 27 23:23:21 PST 1999
>Originator:     Robert Watson
>Release:        FreeBSD 2.2.6-STABLE i386
>Organization:
TISLabs at Network Associates, Inc.
>Environment:

FreeBSD-stable, FreeBSD-current, secure bind 8

>Description:

gethostbydns in libc generates *lots* of warnings when used in an environment
with DNSsec.  Given the impending release of secure bind, this is a good thing
to fix now before the next release of FreeBSD.  

>How-To-Repeat:

ping buddy.netsec.tis.com

>Fix:
	
this fix just changes the warning level for these warnings when associated
with the DNSsec types from a notify (or such) to a debug level message.

This diff is against stable, but should be identical in current.

--- /home/fbsd-stable/src/lib/libc/net/gethostbydns.c   Sun May 10 08:54:05 1998
+++ /tmp/gethostbydns.c Tue Jul 21 13:23:29 1998
@@ -309,6 +309,15 @@
                        buflen -= n;
                        continue;
                }
+               if ((type == T_SIG) || (type == T_KEY) || (type == T_NXT)) {
+                       /* DNSsec not supported yet */
+                       syslog(LOG_DEBUG|LOG_AUTH,
+       "gethostby*.gethostanswer: asked for \"%s %s %s\", got type \"%s\"",
+                               qname, p_class(C_IN), p_type(qtype),
+                               p_type(type));
+                       cp += n;
+                       continue;
+               }
                if (type != qtype) {
                        syslog(LOG_NOTICE|LOG_AUTH,
        "gethostby*.gethostanswer: asked for \"%s %s %s\", got type \"%s\"",


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: rwatson 
State-Changed-When: Mon Dec 27 23:22:09 PST 1999 
State-Changed-Why:  
Fixed via libc commit to -CURRENT branch: 

rwatson     1999/12/27 23:21:09 PST 

Modified files: 
lib/libc/net         gethostbydns.c  
Log: 
Suppress vast quantities of unneeded warnings spewed by libc's gethostbydns 
on encountering a real-world SIG record during a lookup of another type. 

>Unformatted:
