Bug 30587 - [PATCH] small fix to ifconfig output
Summary: [PATCH] small fix to ifconfig output
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 4.4-STABLE
Hardware: Any Any
: Normal Affects Only Me
Assignee: Yar Tikhiy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-09-15 10:50 UTC by Andre Albsmeier
Modified: 2001-11-14 04:37 UTC (History)
0 users

See Also:


Attachments
file.diff (290 bytes, patch)
2001-09-15 10:50 UTC, Andre Albsmeier
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andre Albsmeier 2001-09-15 10:50:01 UTC
ifconfig -a inserts a blank line in output if interface isn't active:

fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        inet 192.168.128.1 netmask 0xffffff00 broadcast 192.168.128.255
        ether 00:02:b3:1f:25:dc 
        media: Ethernet 100baseTX <full-duplex>
        status: active
fxp1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        inet 146.254.1.172 netmask 0xffffff00 broadcast 146.254.1.255
        ether 00:a0:c9:a9:1d:06 
        media: Ethernet manual

fxp2: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        ether 00:a0:c9:a9:1d:23 
        media: Ethernet manual

lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
        inet 127.0.0.1 netmask 0xff000000 


With the small patch below it will be like this:

fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        inet 192.168.128.1 netmask 0xffffff00 broadcast 192.168.128.255
        ether 00:02:b3:1f:25:dc 
        media: Ethernet 100baseTX <full-duplex>
        status: active
fxp1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        inet 146.254.1.172 netmask 0xffffff00 broadcast 146.254.1.255
        ether 00:a0:c9:a9:1d:06 
        media: Ethernet manual
fxp2: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        ether 00:a0:c9:a9:1d:23 
        media: Ethernet manual
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
        inet 127.0.0.1 netmask 0xff000000

Fix: The patch for -STABLE is:
How-To-Repeat: 
do an ifconfig -a on a machine with inactive interfaces
Comment 1 Yar Tikhiy freebsd_committer freebsd_triage 2001-11-02 02:21:55 UTC
State Changed
From-To: open->analyzed

Fixed in -current. I'll merge it to -stable in a week. Thanks! 


Comment 2 Yar Tikhiy freebsd_committer freebsd_triage 2001-11-02 02:21:55 UTC
Responsible Changed
From-To: freebsd-bugs->yar

I'll fix that.
Comment 3 Yar Tikhiy freebsd_committer freebsd_triage 2001-11-14 04:35:21 UTC
State Changed
From-To: analyzed->closed

Just merged from -current to -stable as well. Thanks!