diff options
author | Renato Westphal <renato@opensourcerouting.org> | 2019-08-08 18:56:39 +0200 |
---|---|---|
committer | Renato Westphal <renato@opensourcerouting.org> | 2019-09-07 02:06:11 +0200 |
commit | e132dea0643499187cc51a332fd6616ee6df387c (patch) | |
tree | 25c71408ff9d31110e804c5966627fca59a28a83 /ospfd/ospf_sr.c | |
parent | lib: introduce encode/decode functions for the MPLS zapi messages (diff) | |
download | frr-e132dea0643499187cc51a332fd6616ee6df387c.tar.xz frr-e132dea0643499187cc51a332fd6616ee6df387c.zip |
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 'ospfd/ospf_sr.c')
-rw-r--r-- | ospfd/ospf_sr.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ospfd/ospf_sr.c b/ospfd/ospf_sr.c index a361d1781..9029eca2b 100644 --- a/ospfd/ospf_sr.c +++ b/ospfd/ospf_sr.c @@ -623,7 +623,8 @@ static int ospf_zebra_send_mpls_labels(int cmd, struct sr_nhlfe nhlfe) zl.prefix.u.prefix4 = nhlfe.prefv4.prefix; zl.nexthop.ipv4 = nhlfe.nexthop; zl.ifindex = nhlfe.ifindex; - zl.distance = OSPF_SR_PRIORITY_DEFAULT; + zl.route_type = ZEBRA_ROUTE_OSPF; + zl.route_instance = 0; zl.local_label = nhlfe.label_in; zl.remote_label = nhlfe.label_out; |