From dan@dan.emsphone.com Wed Oct  6 11:51:04 1999
Return-Path: <dan@dan.emsphone.com>
Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101])
	by hub.freebsd.org (Postfix) with ESMTP id 900BF1506F
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  6 Oct 1999 11:50:53 -0700 (PDT)
	(envelope-from dan@dan.emsphone.com)
Received: (from dan@localhost)
	by dan.emsphone.com (8.9.3/8.9.3) id NAA31385;
	Wed, 6 Oct 1999 13:49:57 -0500 (CDT)
	(envelope-from dan)
Message-Id: <199910061849.NAA31385@dan.emsphone.com>
Date: Wed, 6 Oct 1999 13:49:57 -0500 (CDT)
From: dnelson@emsphone.com
Sender: dan@dan.emsphone.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: netstat -ss doesn't work for ipx
X-Send-Pr-Version: 3.2

>Number:         14168
>Category:       bin
>Synopsis:       netstat -ss doesn't work for ipx
>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:   Wed Oct  6 12:00:01 PDT 1999
>Closed-Date:    Sun Oct 17 22:47:06 PDT 1999
>Last-Modified:  Mon Oct 18 00:00:57 PDT 1999
>Originator:     Dan Nelson
>Release:        FreeBSD 4.0-CURRENT i386
>Organization:
Executive Marketing Services, Inc.
>Environment:

FreeBSD dan.emsphone.com 4.0-CURRENT FreeBSD 4.0-CURRENT #5: Mon Sep 27 10:21:42 CDT 1999     dan@dan.emsphone.com:/usr/src/sys/compile/DANSMP  i386

	

>Description:

Two -s switches on the netstat commandline should suppress printing of
lines with 0 counts.  The ipx code doesn't check the s flag and always
prints all lines.

	

>How-To-Repeat:


netstat -ss -p ipx
	

>Fix:
	
Index: ipx.c
===================================================================
RCS file: /home/ncvs/src/usr.bin/netstat/ipx.c,v
retrieving revision 1.11
diff -u -p -r1.11 ipx.c
--- ipx.c	1999/08/28 01:04:29	1.11
+++ ipx.c	1999/09/19 19:57:04
@@ -152,8 +152,8 @@ ipxprotopr(off, name)
 	}
 }
 
-#define ANY(x,y,z) (printf("\t%u %s%s%s\n",x,y,plural(x),z))
-#define ANYl(x,y,z) (printf("\t%lu %s%s%s\n",x,y,plural(x),z))
+#define ANY(x,y,z) if (x || sflag <= 1) printf("\t%u %s%s%s\n",x,y,plural(x),z)
+#define ANYl(x,y,z) if (x || sflag <= 1) printf("\t%lu %s%s%s\n",x,y,plural(x),z)
 
 /*
  * Dump SPX statistics structure.
	


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: bp 
State-Changed-When: Sun Oct 17 22:47:06 PDT 1999 
State-Changed-Why:  
Committed. Thanks! 
>Unformatted:
 Dan Nelson
