Date: Sun, 31 Jan 2021 10:50:40 GMT From: "Alexander V. Chernikov" <melifaro@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 78c93a172114 - main - Use process fib for inet/inet6 fib_algo sysctls. Message-ID: <202101311050.10VAoepc069600@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=78c93a1721143db656e277f7827ec4d57826044c commit 78c93a1721143db656e277f7827ec4d57826044c Author: Alexander V. Chernikov <melifaro@FreeBSD.org> AuthorDate: 2021-01-31 10:48:47 +0000 Commit: Alexander V. Chernikov <melifaro@FreeBSD.org> CommitDate: 2021-01-31 10:50:08 +0000 Use process fib for inet/inet6 fib_algo sysctls. This allows to set/query fib algo for non-default fibs. MFC after: 3 days --- sys/net/route/fib_algo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/net/route/fib_algo.c b/sys/net/route/fib_algo.c index 21b6ba924069..b2aa2de087de 100644 --- a/sys/net/route/fib_algo.c +++ b/sys/net/route/fib_algo.c @@ -1202,7 +1202,7 @@ static int set_algo_inet_sysctl_handler(SYSCTL_HANDLER_ARGS) { - return (set_fib_algo(RT_DEFAULT_FIB, AF_INET, oidp, req)); + return (set_fib_algo(curthread->td_proc->p_fibnum, AF_INET, oidp, req)); } SYSCTL_PROC(_net_route_algo_inet, OID_AUTO, algo, CTLFLAG_VNET | CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, 0, @@ -1214,7 +1214,7 @@ static int set_algo_inet6_sysctl_handler(SYSCTL_HANDLER_ARGS) { - return (set_fib_algo(RT_DEFAULT_FIB, AF_INET6, oidp, req)); + return (set_fib_algo(curthread->td_proc->p_fibnum, AF_INET6, oidp, req)); } SYSCTL_PROC(_net_route_algo_inet6, OID_AUTO, algo, CTLFLAG_VNET | CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, 0,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202101311050.10VAoepc069600>