linux agent reports only active networks

Bug #612515 reported by Mick K
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OCS Inventory: Unified Unix Agent
Fix Released
Medium
mortheres

Bug Description

Ocsinventory-Agent-1.1.2 in Linux currently only reports network interfaces that have an IP address.
This can really limit reporting on WLAN & Ethernet connections

I am using the following minor changes to /lib/Ocsinventory/Agent/Backend/OS/Linux/Network/Networks.pm

:88
- if ($line =~ /^$/ && $description && $ipaddress) {
+ if ($line =~ /^$/ && $description && $macaddr) {

:154
- $description = $driver = $ipaddress = $ipgateway = $macaddr = $pcislot = $status = $type = $virtualdev = undef;
+ $description = $driver = $ipaddress = $ipmask = $ipgateway = $macaddr = $pcislot = $status = $type = $virtualdev = undef;

I've modified line 154 as the ipmask was not being cleared between reading interfaces. This just meant that if an interface did not have an ipmask (ie. no IP) it could take on a mask of another interface

Thanks,
Michael

Revision history for this message
mortheres (mortheres) wrote :

Hi,

Thanks a lot for your report and patch. Your patch has been integrated at revision 986 http://bazaar.launchpad.net/~ocsinventory-dev/ocsinventory-unix-agent/trunk/revision/986 .

Kind regards,

--
Guillaume

Changed in ocsinventory-unix-agent:
importance: Undecided → Medium
status: New → Fix Committed
assignee: nobody → mortheres (mortheres)
Frank (frank-bourdeau)
Changed in ocsinventory-unix-agent:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.