]> git.baikalelectronics.ru Git - kernel.git/commit
sctp: streams should be recovered when it fails to send request.
authorXin Long <lucien.xin@gmail.com>
Wed, 8 Feb 2017 17:18:16 +0000 (01:18 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 9 Feb 2017 21:57:38 +0000 (16:57 -0500)
commit6e42fdce8c7fc4fcfbbe3484e637764cd3a3967b
tree5001872c733d027698eb2b43d3546d64d0bc1ebe
parent5c7df97771f95d1e442fd7f7f26815f95ffa9553
sctp: streams should be recovered when it fails to send request.

Now when sending stream reset request, it closes the streams to
block further xmit of data until this request is completed, then
calls sctp_send_reconf to send the chunk.

But if sctp_send_reconf returns err, and it doesn't recover the
streams' states back,  which means the request chunk would not be
queued and sent, so the asoc will get stuck, streams are closed
and no packet is even queued.

This patch is to fix it by recovering the streams' states when
it fails to send the request, it is also to fix a return value.

Fixes: f3e3c6e55694 ("sctp: implement sender-side procedures for SSN Reset Request Parameter")
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>
net/sctp/stream.c