summaryrefslogtreecommitdiffstats
path: root/zebra/zebra_dplane.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2020-06-11 13:34:18 +0200
committerStephen Worley <sworley@cumulusnetworks.com>2020-09-28 18:40:59 +0200
commit27805e74f02c9e0b4f0086e8727135788cf9fe2b (patch)
treef42cf0dcae66f79dafbdf61afbc348e62fe535da /zebra/zebra_dplane.c
parentzebra: Only install a minimal amount of times (diff)
downloadfrr-27805e74f02c9e0b4f0086e8727135788cf9fe2b.tar.xz
frr-27805e74f02c9e0b4f0086e8727135788cf9fe2b.zip
zebra: Properly set NEXTHOP_FLAG_FIB when skipping install
When the dataplane detects that we have no need to reinstall the same route, setup the NEXTHOP_FLAG_FIB appropriately. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to '')
-rw-r--r--zebra/zebra_dplane.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/zebra/zebra_dplane.c b/zebra/zebra_dplane.c
index f2725adc5..77abe8bb6 100644
--- a/zebra/zebra_dplane.c
+++ b/zebra/zebra_dplane.c
@@ -2368,11 +2368,25 @@ dplane_route_update_internal(struct route_node *rn,
if ((dplane_ctx_get_type(ctx) == dplane_ctx_get_old_type(ctx))
&& (dplane_ctx_get_nhe_id(ctx)
== dplane_ctx_get_old_nhe_id(ctx))) {
+ struct nexthop *nexthop;
+
if (IS_ZEBRA_DEBUG_DPLANE)
zlog_debug(
"%s: Ignoring Route exactly the same",
__func__);
+ for (ALL_NEXTHOPS_PTR(dplane_ctx_get_ng(ctx),
+ nexthop)) {
+ if (CHECK_FLAG(nexthop->flags,
+ NEXTHOP_FLAG_RECURSIVE))
+ continue;
+
+ if (CHECK_FLAG(nexthop->flags,
+ NEXTHOP_FLAG_ACTIVE))
+ SET_FLAG(nexthop->flags,
+ NEXTHOP_FLAG_FIB);
+ }
+
return ZEBRA_DPLANE_REQUEST_SUCCESS;
}