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)
This commit is contained in:
PipoCanaja
2020-02-05 18:26:42 +01:00
committed by GitHub
parent 4e18e8b5c1
commit ac84eea243

View File

@@ -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'];