]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: Short circuit test for nexthop groups when not using
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 27 Aug 2020 01:34:22 +0000 (21:34 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 27 Aug 2020 01:50:32 +0000 (21:50 -0400)
When we are not using nexthop groups, there is no need to
test for whether or not they are installed correctly or not

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
zebra/zebra_dplane.c

index 6e8d35aa7748f21775c037012f37dda92b69591e..cafcebfbc69e9c691b08ece86aa5b34534b718dd 100644 (file)
@@ -1911,10 +1911,11 @@ int dplane_ctx_route_init(struct zebra_dplane_ctx *ctx, enum dplane_op_e op,
                 * If its a delete we only use the prefix anyway, so this only
                 * matters for INSTALL/UPDATE.
                 */
-               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)) {
+               if (zebra_nhg_kernel_nexthops_enabled()
+                   && (((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;
                }