linux/net/mptcp
Matthieu Baerts (NGI0) ce5f6f71b0 mptcp: sockopt: info: stop early if no buffer
Up to recently, it has been recommended to use getsockopt(MPTCP_INFO) to
check if a fallback to TCP happened, or if the client requested to use
MPTCP.

In this case, the userspace app is only interested by the returned value
of the getsocktop() call, and can then give 0 for the option length, and
NULL for the buffer address. An easy optimisation is then to stop early,
and avoid filling a local buffer -- which now requires two different
locks -- if it is not needed.

Reviewed-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Mat Martineau <martineau@kernel.org>
Link: https://lore.kernel.org/r/20240514011335.176158-4-martineau@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-05-13 18:29:22 -07:00
..
bpf.c bpf: Add update_socket_protocol hook 2023-08-16 10:22:16 -07:00
crypto.c
crypto_test.c mptcp: fill in missing MODULE_DESCRIPTION() 2023-12-17 20:54:22 +00:00
ctrl.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-05-09 10:01:01 -07:00
diag.c mptcp: drop duplicate header inclusions 2024-03-06 20:24:10 -08:00
fastopen.c mptcp: corner case locking for rx path fields initialization 2024-02-12 10:08:13 +00:00
Kconfig
Makefile net: mptcp: use policy generated by YAML spec 2023-10-24 13:00:32 -07:00
mib.c mptcp: add CurrEstab MIB counter support 2024-01-02 13:32:45 +00:00
mib.h mptcp: add CurrEstab MIB counter support 2024-01-02 13:32:45 +00:00
mptcp_diag.c mptcp: drop duplicate header inclusions 2024-03-06 20:24:10 -08:00
mptcp_pm_gen.c mptcp: add token for get-addr in yaml 2024-03-04 13:07:45 +00:00
mptcp_pm_gen.h mptcp: add token for get-addr in yaml 2024-03-04 13:07:45 +00:00
options.c mptcp: add last time fields in mptcp_info 2024-04-11 08:19:54 -07:00
pm.c mptcp: update set_flags interfaces 2024-03-06 20:24:10 -08:00
pm_netlink.c mptcp: drop lookup_by_id in lookup_addr 2024-03-06 20:24:10 -08:00
pm_userspace.c mptcp: set error messages for set_flags 2024-03-06 20:24:10 -08:00
protocol.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-05-02 12:06:25 -07:00
protocol.h mptcp: fix full TCP keep-alive support 2024-05-13 18:29:22 -07:00
sched.c mptcp: register default scheduler 2023-08-22 17:31:19 -07:00
sockopt.c mptcp: sockopt: info: stop early if no buffer 2024-05-13 18:29:22 -07:00
subflow.c mptcp: fix possible NULL dereferences 2024-05-07 16:36:26 -07:00
syncookies.c
token.c mptcp: add statistics for mptcp socket in use 2023-01-09 07:30:50 +00:00
token_test.c mptcp: token kunit: set protocol 2024-02-26 18:42:12 -08:00