OSDN Git Service

mptcp: propagate fastclose error
authorPaolo Abeni <pabeni@redhat.com>
Fri, 30 Sep 2022 15:59:31 +0000 (08:59 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 3 Oct 2022 10:18:53 +0000 (11:18 +0100)
commit69800e516e968fa1cf9202b872dc86515eeeebe6
treef28ca053ed913ffa767f89e6e9fec465389127d6
parent7171e8a1a4a8671783ccd21c5b51108cce8986ed
mptcp: propagate fastclose error

When an mptcp socket is closed due to an incoming FASTCLOSE
option, so specific sk_err is set and later syscall will
fail usually with EPIPE.

Align the current fastclose error handling with TCP reset,
properly setting the socket error according to the current
msk state and propagating such error.

Additionally sendmsg() is currently not handling properly
the sk_err, always returning EPIPE.

Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/mptcp/protocol.c