bin/112126: [patch] netstat(1) segfaults on unusual ICMP statistics

Maxim Konovalov maxim at macomnet.ru
Thu Apr 26 05:10:09 UTC 2007


The following reply was made to PR bin/112126; it has been noted by GNATS.

From: Maxim Konovalov <maxim at macomnet.ru>
To: Chris <wefa2 at gmx.de>
Cc: bug-followup at FreeBSD.org
Subject: Re: bin/112126: [patch] netstat(1) segfaults on unusual ICMP statistics
Date: Thu, 26 Apr 2007 09:01:10 +0400 (MSD)

 On Thu, 26 Apr 2007, 08:38+0400, Maxim Konovalov wrote:
 
 > On Thu, 26 Apr 2007, 00:00+0200, Chris wrote:
 >
 > > Hello,
 > >
 > > postcriptum - I overlooked one detail of Maxim's patch:
 > >
 > > > +static  const char *icmpnames[ICMP_MAXTYPE + 1] = {
 > >
 > > with this he actually avoids the crash in case of an
 > > out of sync kernel interface (assumed the array gets
 > > automatically zeroed at allocation time - does it ? )
 > >
 > > But this still produces a very funny netstat output
 > > with just numbers and no labels. I continue to prefer
 > > my suggestion.
 >
 > I see:
 >
 >         Output histogram:
 >                 echo reply: 41
 >                 destination unreachable: 495
 > [...]
 >         Input histogram:
 >                 echo reply: 12
 >                 destination unreachable: 1
 >                 echo: 41
 >                 #20: 7
 >                 icmp traceroute: 16
 >                 mobile registration req: 25
 >                 #37: 31
 
 You should read above as
 
         Output histogram:
                 echo reply: 41
                 destination unreachable: 511
 [...]
         Input histogram:
                 echo reply: 12
                 destination unreachable: 1
                 echo: 41
                 #20: 7
                 icmp traceroute: 16
                 mobile registration req: 25
                 domain name request: 31
 
 > What is yours?
 >
 >
 
 -- 
 Maxim Konovalov


More information about the freebsd-bugs mailing list