Date: Tue, 12 Jul 2011 21:00:53 +0200 From: Michael Tuexen <tuexen@FreeBSD.org> To: Doug Barton <dougb@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r223947 - head/usr.bin/netstat Message-ID: <6252BB63-BA46-4045-ACFB-F1560D29D301@FreeBSD.org> In-Reply-To: <4E1C8FBD.5050705@FreeBSD.org> References: <201107121147.p6CBl8hY037547@svn.freebsd.org> <4E1C8FBD.5050705@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Jul 12, 2011, at 8:17 PM, Doug Barton wrote: > On 07/12/2011 04:47, Michael Tuexen wrote: >> Author: tuexen >> Date: Tue Jul 12 11:47:08 2011 >> New Revision: 223947 >> URL: http://svn.freebsd.org/changeset/base/223947 >> >> Log: >> Truncate link addresses like it is done for any >> other address type. > > The more IPv6 is used the less optimal this truncation becomes ... I agree. But this patch does not change the display of IPv6 addresses. It just handles one specific case like all the others. I found this because the bug broke a tool which relies on the correct formatting of the netstat output. Best regards Michael > >> MFC after: 4 weeks >> >> Modified: >> head/usr.bin/netstat/if.c >> >> Modified: head/usr.bin/netstat/if.c >> ============================================================================== >> --- head/usr.bin/netstat/if.c Tue Jul 12 10:07:07 2011 (r223946) >> +++ head/usr.bin/netstat/if.c Tue Jul 12 11:47:08 2011 (r223947) >> @@ -394,7 +394,7 @@ intpr(int interval1, u_long ifnetaddr, v >> n = cp - sa->sa_data + 1; >> cp = sa->sa_data; >> hexprint: >> - while (--n >= 0) >> + while ((--n >= 0) && (m < 30)) >> m += printf("%02x%c", *cp++ & 0xff, >> n > 0 ? ':' : ' '); >> m = 32 - m; >> > > > > -- > > Nothin' ever doesn't change, but nothin' changes much. > -- OK Go > > Breadth of IT experience, and depth of knowledge in the DNS. > Yours for the right price. :) http://SupersetSolutions.com/ > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6252BB63-BA46-4045-ACFB-F1560D29D301>
