Bug 682386 - assumes all ethernet devices are named ethX
Summary: assumes all ethernet devices are named ethX
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: sblim-cmpi-network
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Vitezslav Crhonek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 682334 682387
TreeView+ depends on / blocked
 
Reported: 2011-03-05 02:35 UTC by Bill Nottingham
Modified: 2014-03-17 03:26 UTC (History)
4 users (show)

Fixed In Version: sblim-cmpi-network-1.4.0-5.fc18
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 682387 (view as bug list)
Environment:
Last Closed: 2012-08-07 20:06:43 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Bill Nottingham 2011-03-05 02:35:51 UTC
Description of problem:

Network devices can have arbitrary names, and due to
http://fedoraproject.org/wiki/Features/ConsistentNetworkDeviceNaming, will have
different names in Fedora 15.

cmpiOSBase_NetworkPortImplementsIPEndpoint.c:CMPIInstance * _assoc_get_networkPort_INST()
...
  ptr = CMGetCharPtr(name);
  if( strstr(ptr,"eth") != NULL ) { targetClass = _RefLeftClassEth; }
  else if( strstr(ptr,"tr") != NULL ) { targetClass = _RefLeftClassTr; }
  else if( strstr(ptr,"lo") != NULL ) { targetClass = _RefLeftClassLo; }
  else { goto exit; }
...

cmpiOSBase_NetworkPortImplementsIPEndpointProvider.c:CMPIStatus OSBase_NetworkPortImplementsIPEndpointProviderAssociators( CMPIAssociationMI * mi,
...
        if( strcasecmp(resultClass,_RefLeftClassEth) == 0 &&
            strstr(ptr,"eth") != NULL ) {
          _RefLeftClass = _RefLeftClassEth;
        }
        else if( strcasecmp(resultClass,_RefLeftClassTr) == 0 &&
                 strstr(ptr,"tr") != NULL ) {
          _RefLeftClass = _RefLeftClassTr;
        }
        else if( strcasecmp(resultClass,_RefLeftClassLo) == 0 &&
                 strstr(ptr,"lo") != NULL ) {
          _RefLeftClass = _RefLeftClassLo;
        }
        else { goto exit; }
...
same in
CMPIStatus OSBase_NetworkPortImplementsIPEndpointProviderAssociatorNames( CMPIAssociationMI * mi,

OSBase_CommonNetwork.c:int enum_all_netPorts( struct netPortList ** lptr ) {

...
      if(hdchk && hdchk[0]) {
        if( strstr(hdchk[0], "Ethernet") != NULL ) { type = 1; }
        if( strstr(hdchk[0], "Token Ring") != NULL ) { type = 2; }
        if( strstr(hdchk[0], "Local Loopback") != NULL ) { type = 3; }
      }
      else {
        if( strstr(port,"eth") != NULL ) { type = 1; }
        if( strstr(port,"tr")  != NULL ) { type = 2; }
        if( strstr(port,"lo")  != NULL ) { type = 3; }
      }
...
Version-Release number of selected component (if applicable):

sblim-cmpi-network-1.4.0

How reproducible:

Via code inspection.

Comment 1 Fedora End Of Life 2012-08-07 20:06:46 UTC
This message is a notice that Fedora 15 is now at end of life. Fedora
has stopped maintaining and issuing updates for Fedora 15. It is
Fedora's policy to close all bug reports from releases that are no
longer maintained. At this time, all open bugs with a Fedora 'version'
of '15' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that
we were unable to fix it before Fedora 15 reached end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora, you are encouraged to click on
"Clone This Bug" (top right of this page) and open it against that
version of Fedora.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

The process we are following is described here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 2 Vitezslav Crhonek 2012-08-13 10:32:43 UTC
Upstream bug tracker with proposed patch (applied in Fedora):

http://sourceforge.net/tracker/index.php?func=detail&aid=3312510&group_id=128809&atid=712784


Note You need to log in before you can comment on or make changes to this bug.