summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorXin Long <lucien.xin@gmail.com>2017-11-25 21:05:36 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-02-03 17:39:04 +0100
commit14a4e9f6bde8cdba1c0896c0af31304a934e0427 (patch)
treebdda7c3129459264f18489a697c4bc37621e6936 /net
parent55f3de731c0b21ad37f80c7819a925278356ddf1 (diff)
downloadlinux-stable-14a4e9f6bde8cdba1c0896c0af31304a934e0427.tar.gz
linux-stable-14a4e9f6bde8cdba1c0896c0af31304a934e0427.tar.bz2
linux-stable-14a4e9f6bde8cdba1c0896c0af31304a934e0427.zip
sctp: set sender next_tsn for the old result with ctsn_ack_point plus 1
[ Upstream commit 52a395896a051a3d5c34fba67c324f69ec5e67c6 ] When doing asoc reset, if the sender of the response has already sent some chunk and increased asoc->next_tsn before the duplicate request comes, the response will use the old result with an incorrect sender next_tsn. Better than asoc->next_tsn, asoc->ctsn_ack_point can't be changed after the sender of the response has performed the asoc reset and before the peer has confirmed it, and it's value is still asoc->next_tsn original value minus 1. This patch sets sender next_tsn for the old result with ctsn_ack_point plus 1 when processing the duplicate request, to make sure the sender next_tsn value peer gets will be always right. Fixes: 692787cef651 ("sctp: implement receiver-side procedures for the SSN/TSN 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> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net')
-rw-r--r--net/sctp/stream.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sctp/stream.c b/net/sctp/stream.c
index aa629654d27e..9ea6057ed28b 100644
--- a/net/sctp/stream.c
+++ b/net/sctp/stream.c
@@ -541,7 +541,7 @@ struct sctp_chunk *sctp_process_strreset_tsnreq(
i = asoc->strreset_inseq - request_seq - 1;
result = asoc->strreset_result[i];
if (result == SCTP_STRRESET_PERFORMED) {
- next_tsn = asoc->next_tsn;
+ next_tsn = asoc->ctsn_ack_point + 1;
init_tsn =
sctp_tsnmap_get_ctsn(&asoc->peer.tsn_map) + 1;
}