Date: Tue, 30 Mar 2010 08:42:26 GMT From: Fedor Dikarev <fe@rambler-co.ru> To: freebsd-gnats-submit@FreeBSD.org Subject: bin/145194: Changed output of sockstat for AF_INET6 Message-ID: <201003300842.o2U8gQPv010435@www.freebsd.org> Resent-Message-ID: <201003300850.o2U8o3nx014683@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 145194
>Category: bin
>Synopsis: Changed output of sockstat for AF_INET6
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Tue Mar 30 08:50:03 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: Fedor Dikarev
>Release: 6.x, 7.x and 8.x
>Organization:
Rambler
>Environment:
FreeBSD net.park.rambler.ru 7.2-STABLE FreeBSD 7.2-STABLE #1: Tue Jun 2 10:49:29 MSD 2009 root@net.park.rambler.ru:/usr/obj/usr/src/sys/MNGMT amd64
>Description:
It's very hard to distinguish where local address and port ends and foreign address and port starts from sockstat output when using IPv6 addressess.
One space between is enough as I think.
>How-To-Repeat:
root:net{R}[125] sockstat$ sockstat -6
www nginx 58211 9 tcp6 2a02:6b0:1:0:21a:92ff:fe80:f032:802a02:6b0:16:0:10cb:d0b0:7274:4cde:1145
.. and more such lines
>Fix:
Just add one space after local address and port. And get output like this:
root:net{R}[135] sockstat$ sockstat -6
www nginx 58211 12 tcp6 2a02:6b0:1:0:21a:92ff:fe80:f032:80 2a02:6b0:16:0:10cb:d0b0:7274:4cde:1170
Patch attached with submission follows:
--- sockstat.c 2010-03-30 12:37:25.000000000 +0400
+++ sockstat.c.orig 2010-03-30 12:22:06.000000000 +0400
@@ -609,7 +609,6 @@
case AF_INET:
case AF_INET6:
pos += printaddr(s->family, &s->laddr);
- if((AF_INET6 == s->family) && (pos>=58)) { xprintf(" "); }
while (pos < 58)
pos += xprintf(" ");
pos += printaddr(s->family, &s->faddr);
>Release-Note:
>Audit-Trail:
>Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201003300842.o2U8gQPv010435>
