From: Stephen Worley Date: Thu, 21 Nov 2019 20:53:59 +0000 (-0500) Subject: zebra: Set resolved inactive when > multipath_num X-Git-Tag: base_7.3~142^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=4c55b5ff6b7bd722e8490d25a13782163e371f29;p=matthieu%2Ffrr.git zebra: Set resolved inactive when > multipath_num Apparently the multipath_num functionatlity has been broken for a while because we were ignoring the recusive nexthops when marking them inactive based on it. This sets them as inactive as well if the parent breaks it. Signed-off-by: Stephen Worley --- diff --git a/zebra/zebra_nhg.c b/zebra/zebra_nhg.c index 019c228918..ba204bda61 100644 --- a/zebra/zebra_nhg.c +++ b/zebra/zebra_nhg.c @@ -1676,7 +1676,12 @@ int nexthop_active_update(struct route_node *rn, struct route_entry *re) nexthop_active_check(rn, re, nexthop); if (new_active && curr_active >= zrouter.multipath_num) { - UNSET_FLAG(nexthop->flags, NEXTHOP_FLAG_ACTIVE); + struct nexthop *nh; + + /* Set it and its resolved nexthop as inactive. */ + for (nh = nexthop; nh; nh = nh->resolved) + UNSET_FLAG(nh->flags, NEXTHOP_FLAG_ACTIVE); + new_active = 0; }