Description: Allow extra spaces in oui.txt
 oui.txt file is maintained by IEEE and is available at
 http://standards-oui.ieee.org/oui.txt
 .
 Latest versions contain extra spaces at the start of the lines.
 .
 That patch makes loadMac() accept the new format.
Author: Jean-Michel Vourgère <nirgal@debian.com>
Bug: https://bugs.launchpad.net/ocsinventory-server/+bug/1463842
Bug-Debian: https://bugs.debian.org/481301
Forwarded: yes
Last-Update: 2015-06-12
Applied-Upstream: commit:67fe49f77c21cc7b67dfc938a04b6dc1e00a682e

--- ocsinventory-server-2.0.5.orig/ocsreports/require/function_ipdiscover.php
+++ ocsinventory-server-2.0.5/ocsreports/require/function_ipdiscover.php
@@ -145,7 +145,7 @@ function loadMac() {
 	if( $file=@fopen(MAC_FILE,"r") ) {			
 		while (!feof($file)) {				 
 			$line  = fgets($file, 4096);
-			if( preg_match("/^((?:[a-fA-F0-9]{2}-){2}[a-fA-F0-9]{2})\s+\(.+\)\s+(.+)\s*$/", $line, $result ) ) {
+			if( preg_match("/^\s+((?:[a-fA-F0-9]{2}-){2}[a-fA-F0-9]{2})\s+\(.+\)\s+(.+)\s*$/", $line, $result ) ) {
 				$_SESSION['OCS']["mac"][mb_strtoupper(str_replace("-",":",$result[1]))] = $result[2];
 			}				
 		}
