mptcp: sockopt: use new helper for TCP_DEFER_ACCEPT
authorMatthieu Baerts <matthieu.baerts@tessares.net>
Sat, 22 Oct 2022 00:45:05 +0000 (17:45 -0700)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 25 Oct 2022 10:32:54 +0000 (12:32 +0200)
commitcaea64675d8b91deb59140a92f190124399ccd37
tree9cb4c3e1bae5e902fc5ab28f6d1cc90adc4cfc8e
parente64d4deb4de006faf7613c6603f5bf1bd1844ab3
mptcp: sockopt: use new helper for TCP_DEFER_ACCEPT

mptcp_setsockopt_sol_tcp_defer() was doing the same thing as
mptcp_setsockopt_first_sf_only() except for the returned code in case of
error.

Ignoring the error is needed to mimic how TCP_DEFER_ACCEPT is handled
when used with "plain" TCP sockets.

The specific function for TCP_DEFER_ACCEPT can be replaced by the new
mptcp_setsockopt_first_sf_only() helper and errors can be ignored to
stay compatible with TCP. A bit of cleanup.

Suggested-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Acked-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/mptcp/sockopt.c