From owner-freebsd-bugs@FreeBSD.ORG Wed May 28 03:00:28 2003 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9F49637B401 for ; Wed, 28 May 2003 03:00:28 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3E9BC43F93 for ; Wed, 28 May 2003 03:00:26 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h4SA0QUp044513 for ; Wed, 28 May 2003 03:00:26 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h4SA0QQT044512; Wed, 28 May 2003 03:00:26 -0700 (PDT) Resent-Date: Wed, 28 May 2003 03:00:26 -0700 (PDT) Resent-Message-Id: <200305281000.h4SA0QQT044512@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, David Greenman-Lawrence Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 934CD37B401 for ; Wed, 28 May 2003 02:57:06 -0700 (PDT) Received: from dglawrence.com (12-224-163-157.client.attbi.com [12.224.163.157]) by mx1.FreeBSD.org (Postfix) with ESMTP id D848E43FAF for ; Wed, 28 May 2003 02:57:05 -0700 (PDT) (envelope-from dg@nexus.dglawrence.com) Received: from nexus.dglawrence.com (localhost [127.0.0.1]) by dglawrence.com (8.12.9/8.12.6) with ESMTP id h4S9vLFu007842 for ; Wed, 28 May 2003 02:57:21 -0700 (PDT) (envelope-from dg@nexus.dglawrence.com) Received: (from dg@localhost) by nexus.dglawrence.com (8.12.9/8.12.3/Submit) id h4S9vLjq007841; Wed, 28 May 2003 02:57:21 -0700 (PDT) Message-Id: <200305280957.h4S9vLjq007841@nexus.dglawrence.com> Date: Wed, 28 May 2003 02:57:21 -0700 (PDT) From: David Greenman-Lawrence To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: bin/52750: formatting of RTT wrong in traceroute6 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: David Greenman-Lawrence List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 May 2003 10:00:29 -0000 >Number: 52750 >Category: bin >Synopsis: formatting of RTT wrong in traceroute6 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed May 28 03:00:25 PDT 2003 >Closed-Date: >Last-Modified: >Originator: David G. Lawrence >Release: FreeBSD 4.8-STABLE i386 >Organization: Download Technologies, Inc. >Environment: System: FreeBSD nexus.dglawrence.com 4.8-STABLE FreeBSD 4.8-STABLE #0: Tue Apr 29 08:52:57 PDT 2003 dg@nexus.dglawrence.com:/a/src/sys/compile/NEXUS i386 >Description: The output format specifier for the round-trip time in traceroute6 should be changed to %.3f instead of %g since %g doesn't accurately represent the precision of the number being output. In particular, %g truncates trailing zeroes. 0.01 ms does not mean the same thing as 0.010 ms. Although they are numerically identical, they do not have the same precision. This was fixed by me in IPv4 traceroute in rev 1.2, almost 9 years ago. See also PR 52324 for the same problem in ping6. >How-To-Repeat: Use IPv6 and traceroute6 a host. Notice occasional truncated precision when the RTT ends in one or more zeroes. >Fix: Index: traceroute6.c =================================================================== RCS file: /home/ncvs/src/usr.sbin/traceroute6/traceroute6.c,v retrieving revision 1.4.2.4 diff -c -r1.4.2.4 traceroute6.c *** traceroute6.c 3 Jul 2001 11:02:18 -0000 1.4.2.4 --- traceroute6.c 28 May 2003 09:45:33 -0000 *************** *** 867,873 **** print(&rcvmhdr, cc); lastaddr = Rcv.sin6_addr; } ! Printf(" %g ms", deltaT(&t1, &t2)); switch(i - 1) { case ICMP6_DST_UNREACH_NOROUTE: ++unreachable; --- 867,873 ---- print(&rcvmhdr, cc); lastaddr = Rcv.sin6_addr; } ! Printf(" %.3f ms", deltaT(&t1, &t2)); switch(i - 1) { case ICMP6_DST_UNREACH_NOROUTE: ++unreachable; >Release-Note: >Audit-Trail: >Unformatted: