Subject: bin/23897: ntptrace(8) generate spurious error message
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <njoly@pasteur.fr>
List: netbsd-bugs
Date: 12/26/2003 23:40:06
>Number:         23897
>Category:       bin
>Synopsis:       ntptrace(8) generate spurious error message
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Dec 26 22:41:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Nicolas Joly
>Release:        NetBSD 1.6ZG
>Organization:
	Institut Pasteur
>Environment:
System: NetBSD hal.sis.pasteur.fr 1.6ZG NetBSD 1.6ZG (HAL) #0: Thu Dec 11 16:17:54 CET 2003 njoly@hal.sis.pasteur.fr:/local/src/NetBSD/obj/i386/sys/arch/i386/compile/HAL i386
Architecture: i386
Machine: i386
>Description:
ntptrace(8) generate a spurious message `Host not found', while trying
to look up for localhost with host(1) command.

njoly@hal [~]> ntptrace 
Host not found.
localhost: stratum 2, offset -0.063927, synch distance 0.120473
ntp.pasteur.fr: stratum 1, offset 0.000063, synch distance 0.011490

njoly@hal [~]> host localhost
Host not found.
>How-To-Repeat:
run ntptrace.
>Fix:

Index: ntptrace.awk
===================================================================
RCS file: /cvsroot/src/usr.sbin/ntp/ntptrace/ntptrace.awk,v
retrieving revision 1.3
diff -u -r1.3 ntptrace.awk
--- ntptrace.awk	2003/12/26 17:43:02	1.3
+++ ntptrace.awk	2003/12/26 22:31:57
@@ -111,6 +111,7 @@
 }
 
 function dhost(myhost,  command) {
+	if (myhost == "localhost") return myhost
 	command = "host " myhost
 	while (command | getline) {
 	    if (use_numeric) {
>Release-Note:
>Audit-Trail:
>Unformatted: