zebra: zebra_nhg_rib_find() handle recursive case

When going through the zebra_nhg_rib_find(), we now handle the
case of if that nexthop has been recursively resolved. A depend
is created and passed along to zebra_nhg_find().

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
This commit is contained in:
Stephen Worley 2019-07-17 13:26:19 -04:00
parent 583965448f
commit 360aefc018

View File

@ -772,6 +772,10 @@ zebra_nhg_rib_find(uint32_t id, struct nexthop_group *nhg, afi_t rt_afi)
/* change the afi/vrf_id since its a group */
nhg_afi = AFI_UNSPEC;
nhg_vrf_id = 0;
} else if (CHECK_FLAG(nhg->nexthop->flags, NEXTHOP_FLAG_RECURSIVE)) {
nhg_connected_head_init(&nhg_depends);
handle_recursive_depend(&nhg_depends, nhg->nexthop->resolved,
rt_afi);
}
if (!zebra_nhg_find(&nhe, id, nhg, &nhg_depends, nhg_vrf_id, nhg_afi,