Revision 62a29fe3
Added by Ermal LUÇI about 14 years ago
etc/inc/pfsense-utils.inc | ||
---|---|---|
2253 | 2253 |
******/ |
2254 | 2254 |
function load_mac_manufacturer_table() { |
2255 | 2255 |
/* load MAC-Manufacture data from the file */ |
2256 |
$macs=file("/usr/local/share/nmap/nmap-mac-prefixes"); |
|
2256 |
$macs = false; |
|
2257 |
if (file_exists("/usr/local/share/nmap/nmap-mac-prefixes")) |
|
2258 |
$macs=file("/usr/local/share/nmap/nmap-mac-prefixes"); |
|
2257 | 2259 |
if ($macs){ |
2258 | 2260 |
foreach ($macs as $line){ |
2259 | 2261 |
if (preg_match('/([0-9A-Fa-f]{6}) (.*)$/', $line, $matches)){ |
Also available in: Unified diff
Resolves #1529. Check if the file exists before opening it.