Bug 876211

Summary: pifconfig doesn't report more IPv4 addresses correctly
Product: Red Hat Enterprise Linux 6 Reporter: Branislav Náter <bnater>
Component: python-ethtoolAssignee: Bohuslav "Slavek" Kabrda <bkabrda>
Status: CLOSED ERRATA QA Contact: Branislav Náter <bnater>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.4CC: bkabrda, rkuska
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-ethtool-0.6-5.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1027685 1098489 (view as bug list) Environment:
Last Closed: 2013-11-21 21:36:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1027685, 1098489    
Attachments:
Description Flags
Makes pifconfig output correct number of IPv4 addresses for each interface
none
Refactored patch none

Description Branislav Náter 2012-11-13 15:11:06 UTC
Description of problem:
If more IPv4 addresses are bind to one interface, pifconfig doesn't produce correct output. Two interfaces with same IPv4 address are reported. See below.

Version-Release number of selected component (if applicable):
python-ethtool-0.6-2.el6

How reproducible:
always, using steps below

Steps to Reproduce:
1. ip addr add 1.2.3.4 dev <interface>
2. pifconfig
  
Actual results for br0:
<snip>
br0       HWaddr f0:de:f1:18:aa:64 
          inet addr:10.34.24.60 Bcast:10.34.25.255   Mask:255.255.254.0
	  inet6 addr: fe80::f2de:f1ff:fe18:aa64/64 Scope: link
	  inet6 addr: 2620:52:0:2219:f2de:f1ff:fe18:aa64/64 Scope: universe
	  UP BROADCAST RUNNING MULTICAST

br0       HWaddr f0:de:f1:18:aa:64 
          inet addr:10.34.24.60 Bcast:10.34.25.255   Mask:255.255.254.0
	  inet6 addr: fe80::f2de:f1ff:fe18:aa64/64 Scope: link
	  inet6 addr: 2620:52:0:2219:f2de:f1ff:fe18:aa64/64 Scope: universe
	  UP BROADCAST RUNNING MULTICAST

Expected results:
<snip>
br0       HWaddr f0:de:f1:18:aa:64 
          inet addr:10.34.24.60 Bcast:10.34.25.255   Mask:255.255.254.0
          inet addr:1.2.3.4 Bcast:   Mask:255.255.255.255
	  inet6 addr: fe80::f2de:f1ff:fe18:aa64/64 Scope: link
	  inet6 addr: 2620:52:0:2219:f2de:f1ff:fe18:aa64/64 Scope: universe
	  UP BROADCAST RUNNING MULTICAST

Comment 2 RHEL Program Management 2012-12-14 08:38:33 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 3 Bohuslav "Slavek" Kabrda 2013-08-07 10:00:24 UTC
Created attachment 783781 [details]
Makes pifconfig output correct number of IPv4 addresses for each interface

Comment 4 RHEL Program Management 2013-08-07 11:40:03 UTC
This request was evaluated by Red Hat Product Management for
inclusion in a Red Hat Enterprise Linux release.  Product
Management has requested further review of this request by
Red Hat Engineering, for potential inclusion in a Red Hat
Enterprise Linux release for currently deployed products.
This request is not yet committed for inclusion in a release.

Comment 5 Robert Kuska 2013-08-07 15:30:18 UTC
Created attachment 783975 [details]
Refactored patch

Patch with refactored bits2netmask function.

Comment 6 Bohuslav "Slavek" Kabrda 2013-08-07 15:44:53 UTC
Patch applied as part of commit http://pkgs.devel.redhat.com/cgit/rpms/python-ethtool/commit/?h=rhel-6.5&id=877d7ec6bd909c9fee92d0739eadd866d2afcab0

Comment 8 Bohuslav "Slavek" Kabrda 2013-08-08 06:02:58 UTC
There was a regression in previous commit that prevented pifconfig from starting, I fixed that in python-ethtool-0.6-5.el6, commit http://pkgs.devel.redhat.com/cgit/rpms/python-ethtool/commit/?h=rhel-6.5&id=0bba5656624e70b209cdf43883fc8ef1e7d70507

Comment 10 errata-xmlrpc 2013-11-21 21:36:52 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-1662.html