]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
In revision 1.14 I broke the -4 and -6 options of sockstat(1).
authorGiorgos Keramidas <keramida@FreeBSD.org>
Sun, 12 Nov 2006 19:03:39 +0000 (19:03 +0000)
committerGiorgos Keramidas <keramida@FreeBSD.org>
Sun, 12 Nov 2006 19:03:39 +0000 (19:03 +0000)
commitd2d77d2aeec7b84f7205134f87f2409d8d543e03
tree8ce15ab6814291970674a29fe7b052c4b2db8576
parent9167cd6392c26447fdc8c933b107298d2cae8fbf
In revision 1.14 I broke the -4 and -6 options of sockstat(1).
Using either one of the two would result in an empty protos[]
array, and no sockets were actually listed:

  % sockstat -4
  USER     COMMAND    PID   FD PROTO  LOCAL ADDRESS         FOREIGN ADDRESS
  % sockstat -6
  USER     COMMAND    PID   FD PROTO  LOCAL ADDRESS         FOREIGN ADDRESS
  %

Fix this bug by tweaking appropriately the logic of handling opt_4,
opt_6, opt_u and protos_defined.

Submitted by: des
Pointy hat: keramida
usr.bin/sockstat/sockstat.c