From 9d43854d9404463feef34671c59501cd77aa72bf Mon Sep 17 00:00:00 2001 From: Mark Stapp Date: Wed, 20 May 2020 16:43:11 -0400 Subject: [PATCH] zebra: only use ACTIVE nexthops in recursive resolution Only use ACTIVE nexthops to resolve recursive routes, not all nexthops from a resolving route. Signed-off-by: Mark Stapp --- zebra/zebra_nhg.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/zebra/zebra_nhg.c b/zebra/zebra_nhg.c index 1fc2c30c38..fc429cf55c 100644 --- a/zebra/zebra_nhg.c +++ b/zebra/zebra_nhg.c @@ -1734,6 +1734,10 @@ static bool nexthop_valid_resolve(const struct nexthop *nexthop, if (CHECK_FLAG(resolved->flags, NEXTHOP_FLAG_RECURSIVE)) return false; + /* Must be ACTIVE */ + if (!CHECK_FLAG(resolved->flags, NEXTHOP_FLAG_ACTIVE)) + return false; + switch (nexthop->type) { case NEXTHOP_TYPE_IPV4_IFINDEX: case NEXTHOP_TYPE_IPV6_IFINDEX: