From ac84eea24307a71bd52adbd3c5db821407ffbe5e Mon Sep 17 00:00:00 2001 From: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com> Date: Wed, 5 Feb 2020 18:26:42 +0100 Subject: [PATCH] MPLS Route discovery - Wrong variable assignation order (#11103) Interfaces are not discovered for MPLS routes because of wrong order in the commands (read before variable being initilized) --- includes/discovery/route.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/discovery/route.inc.php b/includes/discovery/route.inc.php index 0b2a0200bc..20f8c35a9b 100644 --- a/includes/discovery/route.inc.php +++ b/includes/discovery/route.inc.php @@ -258,9 +258,9 @@ if ($mpls_skip != 1) { $entry['inetCidrRouteNextHop'] = normalize_snmp_ip_address($inetCidrRouteNextHop); $entry['context_name'] = $vpnId; $entry['device_id'] = $device['device_id']; + $entry['inetCidrRouteIfIndex'] = $entry['mplsL3VpnVrfRteInetCidrIfIndex']; $entry['port_id'] = Device::find($device['device_id'])->ports()->where('ifIndex', '=', $entry['inetCidrRouteIfIndex'])->first()->port_id; $entry['updated_at'] = $update_timestamp; - $entry['inetCidrRouteIfIndex'] = $entry['mplsL3VpnVrfRteInetCidrIfIndex']; $entry['inetCidrRouteType'] = $entry['mplsL3VpnVrfRteInetCidrType']; $entry['inetCidrRouteProto'] = $entry['mplsL3VpnVrfRteInetCidrProto']; $entry['inetCidrRouteMetric1'] = $entry['mplsL3VpnVrfRteInetCidrMetric1'];