]> git.baikalelectronics.ru Git - kernel.git/commit
sctp: set sender next_tsn for the old result with ctsn_ack_point plus 1
authorXin Long <lucien.xin@gmail.com>
Sat, 25 Nov 2017 13:05:36 +0000 (21:05 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 27 Nov 2017 15:38:45 +0000 (00:38 +0900)
commitd32d29d59f2df8bf62efef31c229c37dd34bcaf0
tree43ba6d5322c022f3cc0477820f59d3017fbaf76a
parent83eed60c2bf7b63121376157c3fc575812b48c87
sctp: set sender next_tsn for the old result with ctsn_ack_point plus 1

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: f533672ef5ea ("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>
net/sctp/stream.c