summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2011-05-14 13:59:11 +0000
committerErmal <eri@pfsense.org>2011-05-14 13:59:11 +0000
commit4e4de1d1af14cd8849418ca46c144966a8129a4c (patch)
tree621f153a9b4221e75215e3ab0d8a8b125c3d4d03 /etc
parent4450527f90d05a6d267ed376e968935ed99382e8 (diff)
downloadpfsense-4e4de1d1af14cd8849418ca46c144966a8129a4c.zip
pfsense-4e4de1d1af14cd8849418ca46c144966a8129a4c.tar.gz
Resolves #1529. Check if the file exists before opening it.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/pfsense-utils.inc4
1 files changed, 3 insertions, 1 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index 255691a..47015af 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -2191,7 +2191,9 @@ function filter_rules_compare($a, $b) {
******/
function load_mac_manufacturer_table() {
/* load MAC-Manufacture data from the file */
- $macs=file("/usr/local/share/nmap/nmap-mac-prefixes");
+ $macs = false;
+ if (file_exists("/usr/local/share/nmap/nmap-mac-prefixes"))
+ $macs=file("/usr/local/share/nmap/nmap-mac-prefixes");
if ($macs){
foreach ($macs as $line){
if (preg_match('/([0-9A-Fa-f]{6}) (.*)$/', $line, $matches)){
OpenPOWER on IntegriCloud