update to allow NG interfaces on FreeBSD

git-svn-id: http://www.observium.org/svn/observer/trunk@423 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2009-05-03 22:13:41 +00:00
parent a7eec40925
commit 7d26638df5

View File

@ -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')");