From 360aefc01854e9d4bb4163e85adc82354817ecdb Mon Sep 17 00:00:00 2001 From: Stephen Worley Date: Wed, 17 Jul 2019 13:26:19 -0400 Subject: [PATCH] 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 --- zebra/zebra_nhg.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/zebra/zebra_nhg.c b/zebra/zebra_nhg.c index 9a4c08be7e..15367b2742 100644 --- a/zebra/zebra_nhg.c +++ b/zebra/zebra_nhg.c @@ -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,