ipdiscover-util.pl patch to remove registered hosts and add Mac support

Bug #1214436 reported by Daniel Rich
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OCS Inventory: Server
Fix Committed
Medium
mortheres

Bug Description

(originally posted in the forums at: http://forums.ocsinventory-ng.org/viewtopic.php?id=13195)

One of the things that has always bugged me about ipdiscover-util and the analyze button is that it gives me hosts that include the ones I have already registered. This can be fixed by updating the SELECT statement at line 374 to restrict it to hosts that aren't already in the network_devices table. The new line would look like:
  $request = $dbh->prepare('SELECT IP,MASK,MAC,DATE FROM netmap LEFT JOIN networks ON MACADDR=MAC where MACADDR IS NULL AND MAC NOT IN (SELECT MACADDR FROM network_devices)');

There is also an issue where the error message numbers that ipdiscover-util returns are always "345", the patch below also addresses that issue. The patch also include code to allow the proper recognition of Mac systems and a fix for the nmap parsing (I'm not sure that will work for everyone, but it is needed with nmap 6.25).

Revision history for this message
Daniel Rich (drich-u) wrote :
Revision history for this message
mortheres (mortheres) wrote :

Hi,

Thanks a lot for your patch. It has been integrated in revision 717 of the lp:ocsinventory-server/stable-2.1 branch: http://bazaar.launchpad.net/~ocsinventory-dev/ocsinventory-server/stable-2.1/revision/717

It will be included in final OCS 2.1 release :D :D.

Kind regards,

--
Guillaume

Changed in ocsinventory-server:
milestone: none → 2.1
assignee: nobody → mortheres (mortheres)
importance: Undecided → Medium
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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