diff --git a/includes/discovery/bgp-peers.inc.php b/includes/discovery/bgp-peers.inc.php index a4d04e1793..4c2eccaf4b 100644 --- a/includes/discovery/bgp-peers.inc.php +++ b/includes/discovery/bgp-peers.inc.php @@ -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) { diff --git a/tests/data/vrp_ce12804-withvrf.json b/tests/data/vrp_ce12804-withvrf.json index aef2837390..1dd1d1a59c 100644 --- a/tests/data/vrp_ce12804-withvrf.json +++ b/tests/data/vrp_ce12804-withvrf.json @@ -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", diff --git a/tests/snmpsim/vrp_ce12804-withvrf.snmprec b/tests/snmpsim/vrp_ce12804-withvrf.snmprec index 7c17382a79..2c25075ad5 100644 --- a/tests/snmpsim/vrp_ce12804-withvrf.snmprec +++ b/tests/snmpsim/vrp_ce12804-withvrf.snmprec @@ -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