diff --git a/include/net/nexthop.h b/include/net/nexthop.h index 7268e2760e4088..0291251e48cee3 100644 --- a/include/net/nexthop.h +++ b/include/net/nexthop.h @@ -290,7 +290,7 @@ static inline unsigned int nexthop_num_path(const struct nexthop *nh) struct nh_group *nh_grp; nh_grp = rcu_dereference_rtnl(nh->nh_grp); - if (nh_grp->mpath) + if (nh_grp->mpath || nh_grp->resilient) rc = nh_grp->num_nh; } @@ -371,7 +371,7 @@ struct fib_nh_common *nexthop_fib_nhc(struct nexthop *nh, int nhsel) struct nh_group *nh_grp; nh_grp = rcu_dereference_rtnl(nh->nh_grp); - if (nh_grp->mpath) { + if (nh_grp->mpath || nh_grp->resilient) { nh = nexthop_mpath_select(nh_grp, nhsel); if (!nh) return NULL;