summaryrefslogtreecommitdiff
path: root/zebra/zebra_mpls.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2019-08-08 13:56:39 -0300
committerRenato Westphal <renato@opensourcerouting.org>2019-09-06 21:06:11 -0300
commite132dea0643499187cc51a332fd6616ee6df387c (patch)
tree25c71408ff9d31110e804c5966627fca59a28a83 /zebra/zebra_mpls.c
parentbad6b0e72ea5730031b7851ee6c8e422cbb1f270 (diff)
zebra: identify MPLS FTNs by route type and instance
Use the route type and instance instead of the route distance to identify MPLS FTNs. This is a more robust approach since the routing daemons can modify the distance of their announced routes via configuration, which can cause inconsistencies. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'zebra/zebra_mpls.c')
-rw-r--r--zebra/zebra_mpls.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/zebra/zebra_mpls.c b/zebra/zebra_mpls.c
index 5214f1f22d..897c525949 100644
--- a/zebra/zebra_mpls.c
+++ b/zebra/zebra_mpls.c
@@ -2542,8 +2542,8 @@ static bool mpls_ftn_update_nexthop(int add, struct nexthop *nexthop,
*/
int mpls_ftn_update(int add, struct zebra_vrf *zvrf, enum lsp_types_t type,
struct prefix *prefix, enum nexthop_types_t gtype,
- union g_addr *gate, ifindex_t ifindex, uint8_t distance,
- mpls_label_t out_label)
+ union g_addr *gate, ifindex_t ifindex, uint8_t route_type,
+ unsigned short route_instance, mpls_label_t out_label)
{
struct route_table *table;
struct route_node *rn;
@@ -2562,7 +2562,7 @@ int mpls_ftn_update(int add, struct zebra_vrf *zvrf, enum lsp_types_t type,
RNODE_FOREACH_RE (rn, re) {
if (CHECK_FLAG(re->status, ROUTE_ENTRY_REMOVED))
continue;
- if (re->distance == distance)
+ if (re->type == route_type && re->instance == route_instance)
break;
}