From owner-svn-src-all@FreeBSD.ORG Sun May 31 08:10:35 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EE526468; Sun, 31 May 2015 08:10:35 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DB673164C; Sun, 31 May 2015 08:10:35 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4V8AZlZ074649; Sun, 31 May 2015 08:10:35 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4V8AZWR074647; Sun, 31 May 2015 08:10:35 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201505310810.t4V8AZWR074647@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 31 May 2015 08:10:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283806 - head/contrib/traceroute X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 May 2015 08:10:36 -0000 Author: tuexen Date: Sun May 31 08:10:35 2015 New Revision: 283806 URL: https://svnweb.freebsd.org/changeset/base/283806 Log: When the packet verification fails in verbose mode, print the correct number of words in host byte order. Also remove a stray 'x'. MFC after: 3 days Modified: head/contrib/traceroute/traceroute.c Modified: head/contrib/traceroute/traceroute.c ============================================================================== --- head/contrib/traceroute/traceroute.c Sun May 31 07:31:20 2015 (r283805) +++ head/contrib/traceroute/traceroute.c Sun May 31 08:10:35 2015 (r283806) @@ -1346,8 +1346,8 @@ packet_ok(register u_char *buf, int cc, Printf("\n%d bytes from %s to ", cc, inet_ntoa(from->sin_addr)); Printf("%s: icmp type %d (%s) code %d\n", inet_ntoa(ip->ip_dst), type, pr_type(type), icp->icmp_code); - for (i = 4; i < cc ; i += sizeof(*lp)) - Printf("%2d: x%8.8x\n", i, *lp++); + for (i = 4; i <= cc - ICMP_MINLEN; i += sizeof(*lp)) + Printf("%2d: %8.8x\n", i, ntohl(*lp++)); } #endif return(0);