From owner-freebsd-current Thu Jan 6 2: 6:53 2000 Delivered-To: freebsd-current@freebsd.org Received: from ren.detir.qld.gov.au (ns.detir.qld.gov.au [203.46.81.66]) by hub.freebsd.org (Postfix) with ESMTP id 7566915452 for ; Thu, 6 Jan 2000 02:06:48 -0800 (PST) (envelope-from syssgm@detir.qld.gov.au) Received: by ren.detir.qld.gov.au; id UAA13642; Thu, 6 Jan 2000 20:06:33 +1000 (EST) Received: from ogre.detir.qld.gov.au(167.123.8.3) via SMTP by ren.detir.qld.gov.au, id smtpd013639; Thu Jan 6 20:06:29 2000 Received: from atlas.detir.qld.gov.au (atlas.detir.qld.gov.au [167.123.8.9]) by ogre.detir.qld.gov.au (8.8.8/8.8.7) with ESMTP id UAA11215 for ; Thu, 6 Jan 2000 20:06:06 +1000 (EST) Received: from nymph.detir.qld.gov.au (nymph.detir.qld.gov.au [167.123.10.10]) by atlas.detir.qld.gov.au (8.8.5/8.8.5) with ESMTP id UAA22210 for ; Thu, 6 Jan 2000 20:06:05 +1000 (EST) Received: from nymph.detir.qld.gov.au (localhost [127.0.0.1]) by nymph.detir.qld.gov.au (8.9.3/8.8.7) with ESMTP id UAA21698; Thu, 6 Jan 2000 20:06:04 +1000 (EST) (envelope-from syssgm@nymph.detir.qld.gov.au) Message-Id: <200001061006.UAA21698@nymph.detir.qld.gov.au> To: freebsd-current@freebsd.org Cc: syssgm@detir.qld.gov.au Subject: Small fix to netstat argument processing Date: Thu, 06 Jan 2000 20:06:04 +1000 From: Stephen McKay Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I've got very used to an alias ns='netstat -f inet' which lets me do all the things I like to do without annoying me with stuff I don't want to see. All the options that don't care about the address family just ignore that option. Or, used to. Recently that changed, and "netstat -f inet -i" in particular changed to give the -f flag priority over the -i flag. This makes no sense to me, so I intend to commit this patch: --- netstat/main.c.old Tue Jan 4 16:14:46 2000 +++ netstat/main.c Thu Jan 6 18:19:24 2000 @@ -460,9 +460,6 @@ */ #endif if (iflag) { - if (af != AF_UNSPEC) - goto protostat; - kread(0, 0, 0); intpr(interval, nl[N_IFNET].n_value, NULL); exit(0); @@ -501,7 +498,6 @@ exit(0); } - protostat: kread(0, 0, 0); if (af == AF_INET || af == AF_UNSPEC) for (tp = protox; tp->pr_name; tp++) It removes the special case that specifically makes "netstat -f inet -i" act the opposite to the way it used to (and the way I expect). Any problems, folks? Is there some bizarre IPv6 impact I've not seen? Hmm, I've just noticed some small misalignment of column headings in the default output. I'll fix that too. Stephen. PS Roll on 4.0-RELEASE! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message