aboutsummaryrefslogtreecommitdiffstats
path: root/net/unix/af_unix.c
diff options
context:
space:
mode:
authorAlexander Aring <[email protected]>2025-04-29 20:29:11 +0000
committerDavid Teigland <[email protected]>2025-04-30 14:26:34 +0000
commit55612ddb62fc12437a7ff2f27b51a8981bc187a4 (patch)
tree3b6c81cb86f7a88b049188dca0f97094307e7073 /net/unix/af_unix.c
parentdlm: mask sk_shutdown value (diff)
downloadkernel-55612ddb62fc12437a7ff2f27b51a8981bc187a4.tar.gz
kernel-55612ddb62fc12437a7ff2f27b51a8981bc187a4.zip
dlm: use SHUT_RDWR for SCTP shutdown
Currently SCTP shutdown() call gets stuck because there is no incoming EOF indicator on its socket. On the peer side the EOF indicator as recvmsg() returns 0 will be triggered as mechanism to flush the socket queue on the receive side. In SCTP recvmsg() function sctp_recvmsg() we can see that only if sk_shutdown has the bit RCV_SHUTDOWN set SCTP will recvmsg() will return EOF. The RCV_SHUTDOWN bit will only be set when shutdown with SHUT_RD is called. We use now SHUT_RDWR to also get a EOF indicator from recvmsg() call on the shutdown() initiator. SCTP does not support half closed sockets and the semantic of SHUT_WR is different here, it seems that calling SHUT_WR on sctp sockets keeps the socket open to have the possibility to do some specific SCTP operations on it that we don't do here. There exists still a difference in the limitations of TCP vs SCTP in case if we are required to have a half closed socket functionality. This was tried to archieve with DLM protocol changes in the past and hopefully we really don't require half closed socket functionality. Signed-off-by: Alexander Aring <[email protected]> Tested-by: Heming zhao <[email protected]> Reviewed-by: Heming zhao <[email protected]> Signed-off-by: David Teigland <[email protected]>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions