The branch main has been updated by pouria: URL: https://cgit.FreeBSD.org/src/commit/?id=3d030136ad1906e6d463673a8d2ef313eb054fb3
commit 3d030136ad1906e6d463673a8d2ef313eb054fb3 Author: Pouria Mousavizadeh Tehrani <[email protected]> AuthorDate: 2026-09-22 19:23:00 +0000 Commit: Pouria Mousavizadeh Tehrani <[email protected]> CommitDate: 2026-09-22 19:23:00 +0000 route/fib_algo: Respect immediate_sync in fd_ref_nhop Now fd_ref_nhop() returns zero for cross family routes, Do not schedule nhop references and try to rebuild it immediately for connected and static routes. PR: 298733 Fixes: 633438224304 ("route/fib_algo: Fix nexthop index ...") --- sys/net/route/fib_algo.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/net/route/fib_algo.c b/sys/net/route/fib_algo.c index 44a8b7ff445a..edeac703fedc 100644 --- a/sys/net/route/fib_algo.c +++ b/sys/net/route/fib_algo.c @@ -849,8 +849,10 @@ handle_rtable_change_cb(struct rib_head *rnh, struct rib_cmd_info *rc, */ if (rc->rc_nh_new != NULL) { if (fib_ref_nhop(fd, rc->rc_nh_new) == 0) { - /* ran out of indexes */ - schedule_fd_rebuild(fd, "ran out of nhop indexes"); + if (immediate_sync) + rebuild_fd(fd, "ran out of nhop indexes"); + else + schedule_fd_rebuild(fd, "ran out of nhop indexes"); return; } }
