]> git.dujemihanovic.xyz Git - linux.git/commit
mptcp: only allow set existing scheduler for net.mptcp.scheduler
authorGregory Detal <gregory.detal@gmail.com>
Mon, 6 May 2024 15:35:28 +0000 (17:35 +0200)
committerJakub Kicinski <kuba@kernel.org>
Wed, 8 May 2024 00:23:35 +0000 (17:23 -0700)
commit6963c508fd7ab66ae0b7ae3db9a62ca6267f1ae8
treed4132c7758136ed45d01e84286b1daf288f51520
parent19e35f24750ddf860c51e51c68cf07ea181b4881
mptcp: only allow set existing scheduler for net.mptcp.scheduler

The current behavior is to accept any strings as inputs, this results in
an inconsistent result where an unexisting scheduler can be set:

  # sysctl -w net.mptcp.scheduler=notdefault
  net.mptcp.scheduler = notdefault

This patch changes this behavior by checking for existing scheduler
before accepting the input.

Fixes: e3b2870b6d22 ("mptcp: add a new sysctl scheduler")
Cc: stable@vger.kernel.org
Signed-off-by: Gregory Detal <gregory.detal@gmail.com>
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Tested-by: Geliang Tang <geliang@kernel.org>
Reviewed-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://lore.kernel.org/r/20240506-upstream-net-20240506-mptcp-sched-exist-v1-1-2ed1529e521e@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/mptcp/ctrl.c