summaryrefslogtreecommitdiff
path: root/zebra/zebra_mpls.c
diff options
context:
space:
mode:
authorRuss White <russ@riw.us>2023-12-05 11:00:44 -0500
committerGitHub <noreply@github.com>2023-12-05 11:00:44 -0500
commit0a79e117d6f99d6123fbf39ec122ff1fa4c4f16d (patch)
treec8afc10679e14fcc93769090fd4f9c41f0a97fdf /zebra/zebra_mpls.c
parent270c6c84b10a2fefe3b0a87429049bfa7d706bee (diff)
parentd4aa24ba7df066ee8a9f4bab5c1b4e9ff8474392 (diff)
Merge pull request #12600 from donaldsharp/local_routes
*: Introduce Local Host Routes to FRR
Diffstat (limited to 'zebra/zebra_mpls.c')
-rw-r--r--zebra/zebra_mpls.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/zebra/zebra_mpls.c b/zebra/zebra_mpls.c
index e42c28985a..15e36acda8 100644
--- a/zebra/zebra_mpls.c
+++ b/zebra/zebra_mpls.c
@@ -616,8 +616,9 @@ static int nhlfe_nexthop_active_ipv4(struct zebra_nhlfe *nhlfe,
for (match_nh = match->nhe->nhg.nexthop; match_nh;
match_nh = match_nh->next) {
- if (match->type == ZEBRA_ROUTE_CONNECT
- || nexthop->ifindex == match_nh->ifindex) {
+ if ((match->type == ZEBRA_ROUTE_CONNECT ||
+ match->type == ZEBRA_ROUTE_LOCAL) ||
+ nexthop->ifindex == match_nh->ifindex) {
nexthop->ifindex = match_nh->ifindex;
return 1;
}
@@ -659,9 +660,10 @@ static int nhlfe_nexthop_active_ipv6(struct zebra_nhlfe *nhlfe,
/* Locate a valid connected route. */
RNODE_FOREACH_RE (rn, match) {
- if ((match->type == ZEBRA_ROUTE_CONNECT)
- && !CHECK_FLAG(match->status, ROUTE_ENTRY_REMOVED)
- && CHECK_FLAG(match->flags, ZEBRA_FLAG_SELECTED))
+ if (((match->type == ZEBRA_ROUTE_CONNECT ||
+ match->type == ZEBRA_ROUTE_LOCAL)) &&
+ !CHECK_FLAG(match->status, ROUTE_ENTRY_REMOVED) &&
+ CHECK_FLAG(match->flags, ZEBRA_FLAG_SELECTED))
break;
}