From e132dea0643499187cc51a332fd6616ee6df387c Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Thu, 8 Aug 2019 13:56:39 -0300 Subject: 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 --- ldpd/ldp_zebra.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'ldpd/ldp_zebra.c') diff --git a/ldpd/ldp_zebra.c b/ldpd/ldp_zebra.c index 04e21e8026..be94a7e2bd 100644 --- a/ldpd/ldp_zebra.c +++ b/ldpd/ldp_zebra.c @@ -136,7 +136,8 @@ ldp_zebra_send_mpls_labels(int cmd, struct kroute *kr) fatalx("kr_change: unknown af"); } zl.ifindex = kr->ifindex; - zl.distance = kr->priority; + zl.route_type = kr->route_type; + zl.route_instance = kr->route_instance; zl.local_label = kr->local_label; zl.remote_label = kr->remote_label; @@ -398,7 +399,8 @@ ldp_zebra_read_route(ZAPI_CALLBACK_ARGS) break; } kr.prefixlen = api.prefix.prefixlen; - kr.priority = api.distance; + kr.route_type = api.type; + kr.route_instance = api.instance; switch (api.type) { case ZEBRA_ROUTE_CONNECT: -- cgit v1.2.3