Ignore empty interfaces (for some reason every Active Directory entry gets reports as an interface)

git-svn-id: http://www.observium.org/svn/observer/trunk@1773 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Geert Hauwaerts
2011-01-26 10:30:04 +00:00
parent 69a4a0f63c
commit 67124e84fb

View File

@@ -17,7 +17,6 @@ foreach(explode("\n", $ports) as $entry){
$entry = trim($entry);
list($ifIndex, $ifDescr) = explode("||", $entry, 2);
if(!strstr($entry, "irtual")) {
$if = trim(strtolower($ifDescr));
$nullintf = 0;
@@ -30,6 +29,7 @@ foreach(explode("\n", $ports) as $entry){
}
}
if(empty($ifDescr)) { $nullintf = 1; }
if($device['os'] == "catos" && strstr($if, "vlan") ) { $nullintf = 1; }
$ifDescr = fixifName($ifDescr);
if (preg_match('/serial[0-9]:/', $if)) { $nullintf = 1; }