Date: Thu, 06 Jan 2000 20:06:04 +1000 From: Stephen McKay <syssgm@detir.qld.gov.au> To: freebsd-current@freebsd.org Cc: syssgm@detir.qld.gov.au Subject: Small fix to netstat argument processing Message-ID: <200001061006.UAA21698@nymph.detir.qld.gov.au>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200001061006.UAA21698>