summaryrefslogtreecommitdiffstats
path: root/net/dsa
diff options
context:
space:
mode:
authorXin Long <lucien.xin@gmail.com>2016-07-30 14:09:09 +0800
committerDavid S. Miller <davem@davemloft.net>2016-07-30 22:06:22 -0700
commita0fc6843f948345fa85c218fec662f571804d2f9 (patch)
treee7a10b0ba1686898cefc3bfbb0194d1a5edfed85 /net/dsa
parent1aa25ec227a4be21515594f485b0f4985109f0d8 (diff)
downloadop-kernel-dev-a0fc6843f948345fa85c218fec662f571804d2f9.zip
op-kernel-dev-a0fc6843f948345fa85c218fec662f571804d2f9.tar.gz
sctp: allow delivering notifications after receiving SHUTDOWN
Prior to this patch, once sctp received SHUTDOWN or shutdown with RD, sk->sk_shutdown would be set with RCV_SHUTDOWN, and all events would be dropped in sctp_ulpq_tail_event(). It would cause: 1. some notifications couldn't be received by users. like SCTP_SHUTDOWN_COMP generated by sctp_sf_do_4_C(). 2. sctp would also never trigger sk_data_ready when the association was closed, making it harder to identify the end of the association by calling recvmsg() and getting an EOF. It was not convenient for kernel users. The check here should be stopping delivering DATA chunks after receiving SHUTDOWN, and stopping delivering ANY chunks after sctp_close(). So this patch is to allow notifications to enqueue into receive queue even if sk->sk_shutdown is set to RCV_SHUTDOWN in sctp_ulpq_tail_event, but if sk->sk_shutdown == RCV_SHUTDOWN | SEND_SHUTDOWN, it drops all events. Signed-off-by: Xin Long <lucien.xin@gmail.com> Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud