]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra: Only check nexthop status on route install/update
authorStephen Worley <sworley@cumulusnetworks.com>
Wed, 28 Aug 2019 18:40:16 +0000 (14:40 -0400)
committerStephen Worley <sworley@cumulusnetworks.com>
Fri, 25 Oct 2019 15:13:43 +0000 (11:13 -0400)
We do not need to check that the nexthop is installed or queued
when sending a route deletion since we only need to the prefix for it.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
zebra/zebra_dplane.c

index 04aca1ac7e4d31c3f70afae859767afe4b62fa5b..dea51ded1ba6ac184b7136efc0f08af283e166e7 100644 (file)
@@ -1534,8 +1534,13 @@ static int dplane_ctx_route_init(struct zebra_dplane_ctx *ctx,
                /*
                 * Check if the nhe is installed/queued before doing anything
                 * with this route.
+                *
+                * If its a delete we only use the prefix anyway, so this only
+                * matters for INSTALL/UPDATE.
                 */
-               if (!CHECK_FLAG(nhe->flags, NEXTHOP_GROUP_INSTALLED)
+               if (((op == DPLANE_OP_ROUTE_INSTALL)
+                    || (op == DPLANE_OP_ROUTE_UPDATE))
+                   && !CHECK_FLAG(nhe->flags, NEXTHOP_GROUP_INSTALLED)
                    && !CHECK_FLAG(nhe->flags, NEXTHOP_GROUP_QUEUED)) {
                        ret = ENOENT;
                        goto done;