git: 8de0fc10a1c2 - main - routing: Use a better error number in sysctl_fibs()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 18 Apr 2026 12:32:27 UTC
The branch main has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=8de0fc10a1c2d65bdb39eff862266ab1f87902c8
commit 8de0fc10a1c2d65bdb39eff862266ab1f87902c8
Author: Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2026-04-18 12:21:22 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2026-04-18 12:26:29 +0000
routing: Use a better error number in sysctl_fibs()
ENOTCAPABLE is for capsicum and its use here is inappropriate. In
particular, note that syscallret() treats this value specially.
Reviewed by: glebius, pouria, zlei
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D56481
---
sys/net/route/route_tables.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/net/route/route_tables.c b/sys/net/route/route_tables.c
index 0a865079f6f2..59c7b6c61a93 100644
--- a/sys/net/route/route_tables.c
+++ b/sys/net/route/route_tables.c
@@ -132,7 +132,7 @@ sysctl_fibs(SYSCTL_HANDLER_ARGS)
new_fibs = normalize_num_rtables(new_fibs);
if (new_fibs < V_rt_numfibs)
- error = ENOTCAPABLE;
+ error = EINVAL;
if (new_fibs > V_rt_numfibs)
grow_rtables(new_fibs);
}