From 3179b4cf2038512c8bb16417f0dd9d0ecf4f28f8 Mon Sep 17 00:00:00 2001 From: laf Date: Mon, 15 Jun 2015 12:02:06 +0100 Subject: [PATCH 1/2] fixed junos bgp4 polling :( --- includes/polling/bgp-peers.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/polling/bgp-peers.inc.php b/includes/polling/bgp-peers.inc.php index 7bd17860c..013f47efa 100644 --- a/includes/polling/bgp-peers.inc.php +++ b/includes/polling/bgp-peers.inc.php @@ -13,7 +13,7 @@ if ($config['enable_bgp']) $peer2 = FALSE; echo("Checking BGP peer ".$peer['bgpPeerIdentifier']." "); - if (!empty($peer['bgpPeerIdentifier']) && $device['os'] != "junos") + if ((!strstr($peer['bgpPeerIdentifier'],':') || !empty($peer['bgpPeerIdentifier']) && $device['os'] != "junos")) { # v4 BGP4 MIB // FIXME - needs moved to function From 439b1e5d6d8b9288c2368f68644629483fafac79 Mon Sep 17 00:00:00 2001 From: laf Date: Mon, 15 Jun 2015 12:41:49 +0100 Subject: [PATCH 2/2] Updated if check with f0os code --- includes/polling/bgp-peers.inc.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/polling/bgp-peers.inc.php b/includes/polling/bgp-peers.inc.php index 013f47efa..fda5d553c 100644 --- a/includes/polling/bgp-peers.inc.php +++ b/includes/polling/bgp-peers.inc.php @@ -13,7 +13,8 @@ if ($config['enable_bgp']) $peer2 = FALSE; echo("Checking BGP peer ".$peer['bgpPeerIdentifier']." "); - if ((!strstr($peer['bgpPeerIdentifier'],':') || !empty($peer['bgpPeerIdentifier']) && $device['os'] != "junos")) + if( !empty($peer['bgpPeerIdentifier']) ) { + if( !strstr($peer['bgpPeerIdentifier'],':') || $device['os'] != "junos" ) { # v4 BGP4 MIB // FIXME - needs moved to function @@ -129,6 +130,7 @@ if ($config['enable_bgp']) $bgpLocalAddr = Net_IPv6::compress(implode(':',$bgpLocalAddr6)); unset($bgpLocalAddr6); } } + } if ($bgpPeerFsmEstablishedTime) {