summaryrefslogtreecommitdiffstats
path: root/usr.bin/netstat
diff options
context:
space:
mode:
authortuexen <tuexen@FreeBSD.org>2011-07-12 11:47:08 +0000
committertuexen <tuexen@FreeBSD.org>2011-07-12 11:47:08 +0000
commitab8d20947c9e5b5e7ec0aa95ccf8f2a23f0cbaec (patch)
tree037ca1058117b9f1097ecc217cf6ac41b52621b0 /usr.bin/netstat
parent2131d5b8a4fd027320d07974942b603d4c6f607e (diff)
downloadFreeBSD-src-ab8d20947c9e5b5e7ec0aa95ccf8f2a23f0cbaec.zip
FreeBSD-src-ab8d20947c9e5b5e7ec0aa95ccf8f2a23f0cbaec.tar.gz
Truncate link addresses like it is done for any
other address type. MFC after: 4 weeks
Diffstat (limited to 'usr.bin/netstat')
-rw-r--r--usr.bin/netstat/if.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/netstat/if.c b/usr.bin/netstat/if.c
index fc15607..8a11270 100644
--- a/usr.bin/netstat/if.c
+++ b/usr.bin/netstat/if.c
@@ -394,7 +394,7 @@ intpr(int interval1, u_long ifnetaddr, void (*pfunc)(char *))
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;
OpenPOWER on IntegriCloud