sctp: fix the data size calculation in sctp_data_size
authorXin Long <lucien.xin@gmail.com>
Wed, 17 Oct 2018 13:11:27 +0000 (21:11 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 18 Oct 2018 05:32:21 +0000 (22:32 -0700)
commit5660b9d9d6a29c2c3cc12f62ae44bfb56b0a15a9
tree50cedf7d6c8e57a558190dfff589bc25c9e553a2
parent05c998b738fdd3e5d6a257bcacc8f34b6284d795
sctp: fix the data size calculation in sctp_data_size

sctp data size should be calculated by subtracting data chunk header's
length from chunk_hdr->length, not just data header.

Fixes: 668c9beb9020 ("sctp: implement assign_number for sctp_stream_interleave")
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/sm.h