mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fix wrong ASN discovery on non-BGP Devices (#14948)
* Fix wrong as discovery. if peer has no bgp enabled, the bgp as was miss-discovered * Update includes/discovery/bgp-peers.inc.php Co-authored-by: Tony Murray <murraytony@gmail.com> * tests --------- Co-authored-by: Tony Murray <murraytony@gmail.com> Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com>
This commit is contained in:
@@ -12,7 +12,7 @@ if (file_exists(Config::get('install_dir') . "/includes/discovery/bgp-peers/{$de
|
||||
}
|
||||
|
||||
if (empty($bgpLocalAs)) {
|
||||
$bgpLocalAs = snmp_getnext($device, 'bgpLocalAs', '-OQUsv', 'BGP4-MIB');
|
||||
$bgpLocalAs = \SnmpQuery::get('BGP4-MIB::bgpLocalAs.0')->value();
|
||||
}
|
||||
|
||||
foreach (DeviceCache::getPrimary()->getVrfContexts() as $context_name) {
|
||||
|
@@ -11637,8 +11637,8 @@
|
||||
"ifName": "NULL0",
|
||||
"portName": null,
|
||||
"ifIndex": 4,
|
||||
"ifSpeed": 0,
|
||||
"ifSpeed_prev": null,
|
||||
"ifSpeed": null,
|
||||
"ifSpeed_prev": 0,
|
||||
"ifConnectorPresent": "false",
|
||||
"ifOperStatus": "up",
|
||||
"ifOperStatus_prev": "up",
|
||||
@@ -11737,8 +11737,8 @@
|
||||
"ifName": "InLoopBack0",
|
||||
"portName": null,
|
||||
"ifIndex": 5,
|
||||
"ifSpeed": 0,
|
||||
"ifSpeed_prev": null,
|
||||
"ifSpeed": null,
|
||||
"ifSpeed_prev": 0,
|
||||
"ifConnectorPresent": "false",
|
||||
"ifOperStatus": "up",
|
||||
"ifOperStatus_prev": "up",
|
||||
@@ -23037,8 +23037,8 @@
|
||||
"ifName": "LoopBack2",
|
||||
"portName": null,
|
||||
"ifIndex": 182,
|
||||
"ifSpeed": 0,
|
||||
"ifSpeed_prev": null,
|
||||
"ifSpeed": null,
|
||||
"ifSpeed_prev": 0,
|
||||
"ifConnectorPresent": "false",
|
||||
"ifOperStatus": "up",
|
||||
"ifOperStatus_prev": "up",
|
||||
@@ -23137,8 +23137,8 @@
|
||||
"ifName": "LoopBack200",
|
||||
"portName": null,
|
||||
"ifIndex": 198,
|
||||
"ifSpeed": 0,
|
||||
"ifSpeed_prev": null,
|
||||
"ifSpeed": null,
|
||||
"ifSpeed_prev": 0,
|
||||
"ifConnectorPresent": "false",
|
||||
"ifOperStatus": "up",
|
||||
"ifOperStatus_prev": "up",
|
||||
|
@@ -1327,6 +1327,7 @@
|
||||
1.3.6.1.2.1.10.166.11.1.2.1.1.2.5.116.101.115.116.49.198|2|2
|
||||
1.3.6.1.2.1.10.166.11.1.2.2.1.3.5.116.101.115.116.49|4|
|
||||
1.3.6.1.2.1.10.166.11.1.2.2.1.4.5.116.101.115.116.49|4x|36353330313A3100
|
||||
1.3.6.1.2.1.15.2.0|2|1
|
||||
1.3.6.1.2.1.17.7.1.4.5.1.1.51|66|1
|
||||
1.3.6.1.2.1.17.7.1.4.5.1.1.52|66|1
|
||||
1.3.6.1.2.1.17.7.1.4.5.1.1.53|66|1
|
||||
|
Reference in New Issue
Block a user