summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2017-01-08 08:53:34 +0000
committerume <ume@FreeBSD.org>2017-01-08 08:53:34 +0000
commiteb1e57bb45bd18a19905f710cf48ec4828f86ac5 (patch)
tree18bdcff867058e9c7df3b0ec84ab5008d9176d8f /usr.bin
parent115fb8e05f33f9364409f9f95e405ca9e4e49123 (diff)
downloadFreeBSD-src-eb1e57bb45bd18a19905f710cf48ec4828f86ac5.zip
FreeBSD-src-eb1e57bb45bd18a19905f710cf48ec4828f86ac5.tar.gz
MFC r311426:
When displaying netstat details with libxo in JSON or XML modes, the value conversion for tcp6 and udp6 port numbers drops last digit. PR: 215682
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/netstat/inet6.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/netstat/inet6.c b/usr.bin/netstat/inet6.c
index 421e6e7..e62eeac 100644
--- a/usr.bin/netstat/inet6.c
+++ b/usr.bin/netstat/inet6.c
@@ -1290,7 +1290,7 @@ inet6print(const char *container, struct in6_addr *in6, int port,
xo_emit("{d:target/%-*.*s} ", width, width, line);
- plen = strlen(cp) - 1;
+ plen = strlen(cp);
alen--;
xo_emit("{e:address/%*.*s}{e:port/%*.*s}", alen, alen, line, plen,
plen, cp);
OpenPOWER on IntegriCloud