Bug 30587

Summary: [PATCH] small fix to ifconfig output
Product: Base System Reporter: Andre Albsmeier <Andre.Albsmeier>
Component: binAssignee: Yar Tikhiy <yar>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.4-STABLE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

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 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 2001-11-02 02:21:55 UTC
Responsible Changed
From-To: freebsd-bugs->yar

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

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