From 67124e84fbf5c587295fc98cf1d83f2bb3756d4b Mon Sep 17 00:00:00 2001 From: Geert Hauwaerts Date: Wed, 26 Jan 2011 10:30:04 +0000 Subject: [PATCH] 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 --- includes/discovery/ports.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/discovery/ports.inc.php b/includes/discovery/ports.inc.php index fef1fd5e3..5a68c3fe1 100755 --- a/includes/discovery/ports.inc.php +++ b/includes/discovery/ports.inc.php @@ -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; }