]> git.baikalelectronics.ru Git - kernel.git/commit
sctp: abandon the whole msg if one part of a fragmented message is abandoned
authorXin Long <lucien.xin@gmail.com>
Sat, 25 Nov 2017 13:18:35 +0000 (21:18 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 1 Dec 2017 20:06:24 +0000 (15:06 -0500)
commit9504b2f1f11b37fff3b601641574676ad34d2686
tree4957b2abccb9a0b95294651446e1e124f4d3cab5
parenta8d4f81499faad26965821a44db25900f4f27233
sctp: abandon the whole msg if one part of a fragmented message is abandoned

As rfc3758#section-3.1 demands:

   A3) When a TSN is "abandoned", if it is part of a fragmented message,
       all other TSN's within that fragmented message MUST be abandoned
       at the same time.

Besides, if it couldn't handle this, the rest frags would never get
assembled in peer side.

This patch supports it by adding abandoned flag in sctp_datamsg, when
one chunk is being abandoned, set chunk->msg->abandoned as well. Next
time when checking for abandoned, go checking chunk->msg->abandoned
first.

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>
include/net/sctp/structs.h
net/sctp/chunk.c
net/sctp/outqueue.c