Bug 682374

Summary: linux net event code is... bad
Product: Red Hat Enterprise Linux 6 Reporter: Bill Nottingham <notting>
Component: papiAssignee: William Cohen <wcohen>
Status: CLOSED NOTABUG QA Contact: qe-baseos-tools-bugs
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.1CC: rvokal, wcohen
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 682373 Environment:
Last Closed: 2011-03-10 21:01:27 UTC Type: ---
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: 682373    
Bug Blocks: 682269    

Description Bill Nottingham 2011-03-05 01:28:29 UTC
+++ This bug was initially created as a clone of Bug #682373 +++

Description of problem:

1) It hardcodes devices in the ethX space. Network devices can have arbitrary names, and due to http://fedoraproject.org/wiki/Features/ConsistentNetworkDeviceNaming, will have
different names in Fedora 15.

2) It hardcodes the specific device names, such that it will only read 'lo' and 'eth0-4'. What if you have more than five ethernet devices? What if due to hardware changes, you merely have eth4-7?

3) It does all this by popen()ing ifconfig.

I would think this could be made a lot shorter, simpler, and more correct by just opening and reading /proc/net/dev.

Version-Release number of selected component (if applicable):

papi-4.1.2.1

How reproducible:

By visual inspection.

Comment 2 William Cohen 2011-03-10 20:02:35 UTC
PAPI isn't currently being built with any of the PAPI-C components, so this
isn't visible in any of the executables in the package.

Comment 3 William Cohen 2011-03-10 21:01:27 UTC
This doesn't yield any problem executables because the PAPI-C components are not enabled.