Bug 153731 - [patch] ifconfig(8): ifconfig prints trailing whitespace for interfaces that do not have IFF_BROADCAST (like point to point)
Summary: [patch] ifconfig(8): ifconfig prints trailing whitespace for interfaces that ...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-net (Nobody)
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2011-01-06 15:40 UTC by Nikolay Denev
Modified: 2019-03-21 22:40 UTC (History)
2 users (show)

See Also:


Attachments
file.diff (657 bytes, patch)
2011-01-06 15:40 UTC, Nikolay Denev
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nikolay Denev 2011-01-06 15:40:05 UTC
When showing configuration for interfaces that do not have IFF_BROADCAST enabled, like if_tun, if_gre, etc.
ifconfig prints a trailing whitespace after the netmask.

Fix: Apply attached patch.

Patch attached with submission follows:
How-To-Repeat: #ifconfig gre0
gre0: flags=b151<UP,POINTOPOINT,RUNNING,PROMISC,LINK0,LINK1,MULTICAST> metric 0 mtu 1476
	tunnel inet x.x.x.x --> y.y.y.y
	inet a.a.a.a --> b.b.b.b netmask 0xfffffffc <- Trailing whitespace here! :)
#
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:00:45 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 2 Andriy Voskoboinyk freebsd_committer freebsd_triage 2019-01-28 00:27:21 UTC
Reassign to the net@ list
Comment 3 commit-hook freebsd_committer freebsd_triage 2019-02-26 03:35:13 UTC
A commit references this bug:

Author: asomers
Date: Tue Feb 26 03:34:48 UTC 2019
New revision: 344559
URL: https://svnweb.freebsd.org/changeset/base/344559

Log:
  ifconfig: eliminate trailing whitespace

  Eliminate trailing whitespace on inet, inet6, and groups lines. I think the
  "list txpower" command will still show some, but I'm not able to test that.

  PR: 153731
  Reported-by: Nikolay Denev <ndenev@gmail.com>
  MFC after:	2 weeks
  Differential Revision:	https://reviews.freebsd.org/D19004

Changes:
  head/sbin/ifconfig/af_inet.c
  head/sbin/ifconfig/af_inet6.c
  head/sbin/ifconfig/ifconfig.c
  head/sbin/ifconfig/ifgroup.c
Comment 4 commit-hook freebsd_committer freebsd_triage 2019-03-21 00:18:44 UTC
A commit references this bug:

Author: asomers
Date: Thu Mar 21 00:17:44 UTC 2019
New revision: 345357
URL: https://svnweb.freebsd.org/changeset/base/345357

Log:
  MFC r344559:

  ifconfig: eliminate trailing whitespace

  Eliminate trailing whitespace on inet, inet6, and groups lines. I think the
  "list txpower" command will still show some, but I'm not able to test that.

  PR: 153731
  Reported-by: Nikolay Denev <ndenev@gmail.com>
  Differential Revision:	https://reviews.freebsd.org/D19004

Changes:
_U  stable/12/
  stable/12/sbin/ifconfig/af_inet.c
  stable/12/sbin/ifconfig/af_inet6.c
  stable/12/sbin/ifconfig/ifconfig.c
  stable/12/sbin/ifconfig/ifgroup.c
Comment 5 commit-hook freebsd_committer freebsd_triage 2019-03-21 22:40:25 UTC
A commit references this bug:

Author: asomers
Date: Thu Mar 21 22:40:06 UTC 2019
New revision: 345397
URL: https://svnweb.freebsd.org/changeset/base/345397

Log:
  MFC r343530, r344559

  r343530:
  ifconfig: fix endianness bug displaying pfsync interfaces

  Reviewed by:	kp
  Differential Revision:	https://reviews.freebsd.org/D19005

  r344559:
  ifconfig: eliminate trailing whitespace

  Eliminate trailing whitespace on inet, inet6, and groups lines. I think the
  "list txpower" command will still show some, but I'm not able to test that.

  PR: 153731
  Reported-by: Nikolay Denev <ndenev@gmail.com>
  Differential Revision:	https://reviews.freebsd.org/D19004

Changes:
_U  stable/11/
  stable/11/sbin/ifconfig/af_inet.c
  stable/11/sbin/ifconfig/af_inet6.c
  stable/11/sbin/ifconfig/ifconfig.c
  stable/11/sbin/ifconfig/ifgroup.c
  stable/11/sbin/ifconfig/ifpfsync.c