From 7d26638df528f80e76fbbaf0a81b9ed574f822a7 Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Sun, 3 May 2009 22:13:41 +0000 Subject: [PATCH] update to allow NG interfaces on FreeBSD git-svn-id: http://www.observium.org/svn/observer/trunk@423 61d68cd4-352d-0410-923a-c4978735b2b8 --- includes/discovery/interfaces.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/discovery/interfaces.php b/includes/discovery/interfaces.php index cc469d9bd..44272c733 100755 --- a/includes/discovery/interfaces.php +++ b/includes/discovery/interfaces.php @@ -37,7 +37,9 @@ } $ifDescr = fixifName($ifDescr); if (preg_match('/serial[0-9]:/', $if)) { $nullintf = '1'; } - if (preg_match('/ng[0-9]+$/', $if)) { $nullintf = '1'; } + if(!$config['allow_ng']) { + if (preg_match('/ng[0-9]+$/', $if)) { $nullintf = '1'; } + } if ($nullintf == 0) { if(mysql_result(mysql_query("SELECT COUNT(*) FROM `interfaces` WHERE `device_id` = '".$device['device_id']."' AND `ifIndex` = '$ifIndex'"), 0) == '0') { mysql_query("INSERT INTO `interfaces` (`device_id`,`ifIndex`,`ifDescr`) VALUES ('".$device['device_id']."','$ifIndex','$ifDescr')");