The branch stable/13 has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=e86f5d4fcba8baa6dd3539e595b199035426d262
commit e86f5d4fcba8baa6dd3539e595b199035426d262 Author: Alexander V. Chernikov <[email protected]> AuthorDate: 2021-08-30 21:49:00 +0000 Commit: Alexander V. Chernikov <[email protected]> CommitDate: 2021-09-07 21:02:59 +0000 routing: Disallow zero nexthop weights in nexthop groups. Adding such nexthops breaks calc_min_mpath_slots() assumptions, thus resulting in the incorrect nexthop group creation and eventually leading to panic. Reported by: avg (cherry picked from commit 0a3a377aee9bb28546fd2d1e45baa3fcad02439b) --- sys/net/route/route_ctl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/net/route/route_ctl.c b/sys/net/route/route_ctl.c index a686d1623053..33041f66b925 100644 --- a/sys/net/route/route_ctl.c +++ b/sys/net/route/route_ctl.c @@ -244,6 +244,8 @@ get_info_weight(const struct rt_addrinfo *info, uint32_t default_weight) /* Keep upper 1 byte for adm distance purposes */ if (weight > RT_MAX_WEIGHT) weight = RT_MAX_WEIGHT; + else if (weight == 0) + weight = default_weight; return (weight); } _______________________________________________ [email protected] mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all To unsubscribe, send any mail to "[email protected]"
