Bug 199873 - netstat -i asterisk output missing
Summary: netstat -i asterisk output missing
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 10.1-STABLE
Hardware: Any Any
: --- Affects Some People
Assignee: Gleb Smirnoff
Keywords: regression
Depends on:
Reported: 2015-05-03 03:22 UTC by jyoung15
Modified: 2015-05-06 16:44 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description jyoung15 2015-05-03 03:22:34 UTC
According to netstat(1) for the -i option:

"An asterisk (“*”) after an interface name indicates that the interface is down"

If appears this feature was removed in base r261207:

r261207 | glebius | 2014-01-27 03:15:21 -0500 (Mon, 27 Jan 2014) | 4 lines

Merged /head:r256510,256512,257376,257469,260052:

  Make 'netstat -i' use getifaddrs(3) instead of kvm(3).


Please fix or update documentation.
Comment 1 Gleb Smirnoff freebsd_committer 2015-05-06 13:09:00 UTC
This isn't trivial now when netstat went to libxo. If I restore the functionality as-is, which is quite trivial, then in JSON or XML output the interface name would be mangled.

So, we need asterisk in txt output, but extra field in JSON/XML.
Comment 2 Gleb Smirnoff freebsd_committer 2015-05-06 16:44:01 UTC
Fixed in head.
Comment 3 commit-hook freebsd_committer 2015-05-06 16:44:22 UTC
A commit references this bug:

Author: glebius
Date: Wed May  6 16:43:45 UTC 2015
New revision: 282559
URL: https://svnweb.freebsd.org/changeset/base/282559

  Printing interface names:

  o Restore historical behaviour of appending '*' if interface is down,
    and we have enough space to print it (usually we don't). [1]
  o Do not truncate interface names when printing in encoded format.
  o Report interface flags into encoded format.

  PR:		199873 [1]
  Sponsored by:	Nginx, Inc.