summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 05c998b)
raw | patch | inline | side by side (parent: 05c998b)
author | Xin Long <lucien.xin@gmail.com> | |
Wed, 17 Oct 2018 13:11:27 +0000 (21:11 +0800) | ||
committer | David S. Miller <davem@davemloft.net> | |
Thu, 18 Oct 2018 05:32:21 +0000 (22:32 -0700) |
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>
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 | patch | blob | history |
diff --git a/include/net/sctp/sm.h b/include/net/sctp/sm.h
index 5ef1bad81ef54906b375dbfd0e4fd897d078abce..9e3d32746430cc1a93ab0c8c70a213d76f921d0b 100644 (file)
--- a/include/net/sctp/sm.h
+++ b/include/net/sctp/sm.h
__u16 size;
size = ntohs(chunk->chunk_hdr->length);
- size -= sctp_datahdr_len(&chunk->asoc->stream);
+ size -= sctp_datachk_len(&chunk->asoc->stream);
return size;
}