diff options
Diffstat (limited to 'zebra/zebra_nhg.c')
| -rw-r--r-- | zebra/zebra_nhg.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/zebra/zebra_nhg.c b/zebra/zebra_nhg.c index 2d7521d8be..ba204bda61 100644 --- a/zebra/zebra_nhg.c +++ b/zebra/zebra_nhg.c @@ -1675,10 +1675,13 @@ int nexthop_active_update(struct route_node *rn, struct route_entry *re) new_active = nexthop_active_check(rn, re, nexthop); - if (new_active - && nexthop_group_active_nexthop_num(&new_grp) - >= zrouter.multipath_num) { - UNSET_FLAG(nexthop->flags, NEXTHOP_FLAG_ACTIVE); + if (new_active && curr_active >= zrouter.multipath_num) { + 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; } |
