]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra: Set recursive flag in rib_find() path
authorStephen Worley <sworley@cumulusnetworks.com>
Wed, 24 Jul 2019 16:02:16 +0000 (12:02 -0400)
committerStephen Worley <sworley@cumulusnetworks.com>
Fri, 25 Oct 2019 15:13:41 +0000 (11:13 -0400)
We were not setting the NEXTHOP_GROUP_RECURSIVE flag via
the rib find path. Adding a check and set after successful
creation of a new nhg_hash_entry.

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

index 15367b27428a4320210f3870c9a5201910db48d6..e17ddffec3de0a4b04299a36d48149856651b3a8 100644 (file)
@@ -781,6 +781,8 @@ zebra_nhg_rib_find(uint32_t id, struct nexthop_group *nhg, afi_t rt_afi)
        if (!zebra_nhg_find(&nhe, id, nhg, &nhg_depends, nhg_vrf_id, nhg_afi,
                            false))
                depends_decrement_free(&nhg_depends);
+       else if (CHECK_FLAG(nhg->nexthop->flags, NEXTHOP_FLAG_RECURSIVE))
+               SET_FLAG(nhe->flags, NEXTHOP_GROUP_RECURSIVE);
 
        return nhe;
 }