Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 217775 - sys-apps/net-tools: ifconfig in changed output format
Summary: sys-apps/net-tools: ifconfig in changed output format
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
: 217824 217999 218073 (view as bug list)
Depends on:
Blocks: 179920
  Show dependency tree
 
Reported: 2008-04-15 10:06 UTC by Juergen Rose
Modified: 2011-11-21 20:50 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Juergen Rose 2008-04-15 10:06:52 UTC
'ifconfig -V' shows in both cases:
 net-tools 1.60
ifconfig 1.42 (2001-04-13)

But 'ifconfig' of net-tools-1.60-r13 gives:
root@thinkpad:/root(1)# ifconfig 
br0       Link encap:Ethernet  HWaddr 00:0D:60:D0:75:8E  
          inet addr:192.168.1.24  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::20d:60ff:fed0:758e/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1192 errors:0 dropped:0 overruns:0 frame:0
          TX packets:327 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:276544 (270.0 Kb)  TX bytes:31192 (30.4 Kb)

eth0      Link encap:Ethernet  HWaddr 00:0D:60:D0:75:8E  
          inet6 addr: fe80::20d:60ff:fed0:758e/64 Scope:Link
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
          RX packets:1189 errors:0 dropped:0 overruns:0 frame:0
          TX packets:334 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100 
          RX bytes:297772 (290.7 Kb)  TX bytes:33650 (32.8 Kb)
          Base address:0x8000 Memory:c0240000-c0260000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:3032 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3032 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:256551 (250.5 Kb)  TX bytes:256551 (250.5 Kb)

vbox0     Link encap:Ethernet  HWaddr 00:FF:81:C5:B5:F6  
          inet6 addr: fe80::2ff:81ff:fec5:b5f6/64 Scope:Link
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:878 overruns:0 carrier:0
          collisions:0 txqueuelen:100 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
while ifconfig of net-tools-1.60_p20071202044231 gives:
root@condor:/root(1)# ifconfig 
br0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500  metric 1
        inet 192.168.1.76  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::21a:92ff:fee0:2446  prefixlen 64  scopeid 0x20<link>
        ether 00:1a:92:e0:24:46  txqueuelen 0  (Ethernet)
        RX packets 1615  bytes 308699 (301.4 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1043  bytes 73111 (71.3 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth0: flags=4419<UP,BROADCAST,RUNNING,PROMISC,MULTICAST>  mtu 1500  metric 1
        inet6 fe80::21a:92ff:fee0:2446  prefixlen 64  scopeid 0x20<link>
        ether 00:1a:92:e0:24:46  txqueuelen 1000  (Ethernet)
        RX packets 1615  bytes 308939 (301.6 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1057  bytes 73915 (72.1 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 17  

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 16436  metric 1
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 4112  bytes 344740 (336.6 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 4112  bytes 344740 (336.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

vbox0: flags=4419<UP,BROADCAST,RUNNING,PROMISC,MULTICAST>  mtu 1500  metric 1
        inet6 fe80::2ff:24ff:fe26:890a  prefixlen 64  scopeid 0x20<link>
        ether 00:ff:24:26:89:0a  txqueuelen 100  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 842 overruns 0  carrier 0  collisions 0

Because I wrote a script which parse the output of ifconfig, I have now trouble.
I would be already satisfied, if 'ifconfig -V' would produce different output for both cases.

Regards
  Juergem



Reproducible: Always
Comment 1 Stefan Briesenick (RETIRED) gentoo-dev 2008-04-15 19:37:33 UTC
well, net-misc/openswan-2.4.11 is also broken now:

ipsec_setup: Starting Openswan IPsec U2.4.11/K2.6.22-gentoo-r10...
ipsec_setup: unable to determine address of `ppp0'

great stuff! :-/
Comment 2 Stefan Briesenick (RETIRED) gentoo-dev 2008-04-15 20:05:33 UTC
btw: you can try sys-apps/iproute2

~# ip addr show [<interface>]

this output should be more stable ;-)

on the other hand, you could check the output of "LC_ALL=C ifconfig <int>" if it includes "inet addr: .* Mask" (old style) or "inet .* netmask" (new style).

you could even use a single 'sed' for it.

example:
LC_ALL="C" ifconfig eth1 | \
sed -n -e "s/.* inet addr:\([^ ]\+\) .*Mask:.*/\1/p" \
       -e "s/.* inet \([^ ]\+\) .*netmask .*/\1/p"

should extract the IP, either old or new style.
Comment 3 SpanKY gentoo-dev 2008-04-16 03:40:07 UTC
*** Bug 217824 has been marked as a duplicate of this bug. ***
Comment 4 Grégoire Favre 2008-04-16 05:11:56 UTC
Could you explain me why Bug 217824 is the same as this one ?
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2008-04-17 12:51:14 UTC
*** Bug 218073 has been marked as a duplicate of this bug. ***
Comment 6 SpanKY gentoo-dev 2008-04-19 07:10:16 UTC
ive reverted the ifconfig output changes until openrc can be updated
Comment 8 SpanKY gentoo-dev 2008-04-19 07:31:31 UTC
there's a patch in the upstream openswan tracker to make it use iproute instead of ifconfig/netstat:
http://bugs.xelerance.com/view.php?id=292
Comment 9 SpanKY gentoo-dev 2008-04-19 20:35:48 UTC
*** Bug 217999 has been marked as a duplicate of this bug. ***
Comment 10 Kyle Sanderson 2011-05-10 06:00:50 UTC
This just broke my production server.

Any update on this?
Comment 11 Juergen Rose 2011-05-10 08:00:31 UTC
My ifconfig:

root@orca:/root(4)# ifconfig -V
net-tools 1.60_p20110409135728
ifconfig 1.42 (2001-04-13)
root@orca:/root(5)# qfile -v ifconfig
sys-apps/net-tools-1.60_p20110409135728 (/sbin/ifconfig)

shows now the expected old behaviour:

root@orca:/root(2)# ifconfig 
eth0      Link encap:Ethernet  HWaddr 90:e6:ba:64:85:2e  
          inet addr:141.89.194.24  Bcast:141.89.194.255  Mask:255.255.255.0
          inet6 addr: fe80::92e6:baff:fe64:852e/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5203110 errors:0 dropped:10793 overruns:0 frame:0
          TX packets:11416836 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:817438311 (779.5 MiB)  TX bytes:15030578587 (13.9 GiB)
          Interrupt:69 Base address:0xe000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:469865 errors:0 dropped:0 overruns:0 frame:0
          TX packets:469865 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:208812162 (199.1 MiB)  TX bytes:208812162 (199.1 MiB)
Comment 12 SpanKY gentoo-dev 2011-05-11 18:34:29 UTC
i really dont think it's possible for your system to hit this unless you've got something else wrong.  the changed version never hit stable.
Comment 13 SpanKY gentoo-dev 2011-09-21 04:56:03 UTC
hmm, since upstream openswan is going nowhere, i think i'll add IUSE=old-output and default it to off.  then openswan can depend on that.

Alin: that OK with you ?
Comment 14 Alin Năstac (RETIRED) gentoo-dev 2011-11-06 09:13:20 UTC
(In reply to comment #13)
> hmm, since upstream openswan is going nowhere, i think i'll add IUSE=old-output
> and default it to off.  then openswan can depend on that.
> 
> Alin: that OK with you ?

Yep, that would be fine.
Comment 15 SpanKY gentoo-dev 2011-11-21 20:47:30 UTC
net-tools-1.60_p201111202031570500 in the tree has USE=old-output (the default is the new output style)

ive also added openswan-2.6.37-r1 with the new dependencies