svn commit: r311426 - head/usr.bin/netstat

Hajimu UMEMOTO ume at FreeBSD.org
Thu Jan 5 11:44:29 UTC 2017


Author: ume
Date: Thu Jan  5 11:44:27 2017
New Revision: 311426
URL: https://svnweb.freebsd.org/changeset/base/311426

Log:
  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
  MFC after:	3 days

Modified:
  head/usr.bin/netstat/inet6.c

Modified: head/usr.bin/netstat/inet6.c
==============================================================================
--- head/usr.bin/netstat/inet6.c	Thu Jan  5 11:43:47 2017	(r311425)
+++ head/usr.bin/netstat/inet6.c	Thu Jan  5 11:44:27 2017	(r311426)
@@ -1290,7 +1290,7 @@ inet6print(const char *container, struct
 
 	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);


More information about the svn-src-head mailing list