Bug 215682 - netstat --libxo invalid data output for tcp6 and udp6 socket ports using json/xml modes
Summary: netstat --libxo invalid data output for tcp6 and udp6 socket ports using json...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 11.0-STABLE
Hardware: Any Any
: --- Affects Some People
Assignee: Hajimu UMEMOTO
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-31 10:24 UTC by Ilkka Tuohela
Modified: 2017-01-08 08:58 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ilkka Tuohela 2016-12-31 10:24:38 UTC
When displaying netstat details with libxo in JSON or XML modes, the value conversion for tcp6 and udp6 port numbers drops last digit. 

For example, in output of netstat -an --libxo=json, port 514 for udp6 is shown as 51, and tcp6 port 22 is shown as 2. This same issue applies to --libxo=xml but not to for example html output.
Comment 1 Hiren Panchasara freebsd_committer freebsd_triage 2017-01-02 08:12:14 UTC
+ Marcel, just in case he has some clue.
Comment 2 Hajimu UMEMOTO freebsd_committer freebsd_triage 2017-01-05 09:10:00 UTC
take this.
Comment 3 commit-hook freebsd_committer freebsd_triage 2017-01-05 11:45:11 UTC
A commit references this bug:

Author: ume
Date: Thu Jan  5 11:44:28 UTC 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

Changes:
  head/usr.bin/netstat/inet6.c
Comment 4 commit-hook freebsd_committer freebsd_triage 2017-01-08 08:53:48 UTC
A commit references this bug:

Author: ume
Date: Sun Jan  8 08:53:34 UTC 2017
New revision: 311674
URL: https://svnweb.freebsd.org/changeset/base/311674

Log:
  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

Changes:
_U  stable/11/
  stable/11/usr.bin/netstat/inet6.c
Comment 5 Hajimu UMEMOTO freebsd_committer freebsd_triage 2017-01-08 08:58:23 UTC
Thank you for your report.  It should be fixed now.