]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra: Properly set NEXTHOP_FLAG_FIB when skipping install
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 11 Jun 2020 11:34:18 +0000 (07:34 -0400)
committerStephen Worley <sworley@cumulusnetworks.com>
Mon, 28 Sep 2020 16:40:59 +0000 (12:40 -0400)
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>
zebra/zebra_dplane.c

index f2725adc547630acf3d0c25ad4f9d7e2e710a9fb..77abe8bb6de0a270e30933179cc54f59e426fbb1 100644 (file)
@@ -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;
                }