Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Jan 2017 11:44:27 +0000 (UTC)
From:      Hajimu UMEMOTO <ume@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r311426 - head/usr.bin/netstat
Message-ID:  <201701051144.v05BiRPl058549@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201701051144.v05BiRPl058549>