aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPouria Mousavizadeh Tehrani <pouria@FreeBSD.org>2026-09-22 19:23:00 +0000
committerPouria Mousavizadeh Tehrani <pouria@FreeBSD.org>2026-09-22 19:23:00 +0000
commit3d030136ad1906e6d463673a8d2ef313eb054fb3 (patch)
treec9a801c3dc46d0544fab6482baf4d52625411715
parent50eae683fab8c228606bab707295d9468f97c158 (diff)
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 ...")
-rw-r--r--sys/net/route/fib_algo.c6
1 files 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;
}
}