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 Nirgal Vourgère Bug-Debian: https://bugs.debian.org/481301 Forwarded: no Last-Update: 2015-06-10 --- 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("/^ *((?:[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]; } }