From nobody  Mon Jun  2 20:40:05 1997
Received: (from nobody@localhost)
          by hub.freebsd.org (8.8.5/8.8.5) id UAA01161;
          Mon, 2 Jun 1997 20:40:05 -0700 (PDT)
Message-Id: <199706030340.UAA01161@hub.freebsd.org>
Date: Mon, 2 Jun 1997 20:40:05 -0700 (PDT)
From: denny1@home.com
To: freebsd-gnats-submit@freebsd.org
Subject: ping has a few missing ntohs() & ntohl()
X-Send-Pr-Version: www-1.0

>Number:         3766
>Category:       bin
>Synopsis:       ping has a few missing ntohs() & ntohl()
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun  2 20:50:00 PDT 1997
>Closed-Date:    Sun Aug 10 21:35:16 PDT 1997
>Last-Modified:  Sun Aug 10 21:35:56 PDT 1997
>Originator:     Denton Gentry
>Release:        FreeBSD-current as of 6/2/97
>Organization:
>Environment:
no FreeBSD machine
>Description:
  ping.c is missing a few ntohs/ntohl wrappers around fields in the
more obscure icmp codes.
>How-To-Repeat:
  Found by source inspection while working on ping for OpenBSD.
>Fix:
943c943
<                                       ntohs(icp->icmp_nextmtu));
---
>                                       icp->icmp_nextmtu);
989c989
<               (void)printf("(New addr: 0x%08lx)\n", ntohl(icp->icmp_gwaddr.s_addr));
---
>               (void)printf("(New addr: 0x%08lx)\n", icp->icmp_gwaddr.s_addr);
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: fenner 
State-Changed-When: Sun Aug 10 21:35:16 PDT 1997 
State-Changed-Why:  
Fixed in rev 1.28 and 1.8.2.13 of ping.c .  I used inet_ntoa() instead of 
keeping the %x for the IP address.  Thanks for the bug report! 
>Unformatted:
