aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/sctp/sm.h
diff options
context:
space:
mode:
authorWei Yongjun <yjwei@cn.fujitsu.com>2007-08-21 03:50:01 -0400
committerVlad Yasevich <vladislav.yasevich@hp.com>2007-08-30 13:50:48 -0400
commit00f1c2df2a1c4903f4daa1333bafeb6dcbc9591d (patch)
tree61e9da42f580f7f120bac8c7cbeab39f2a0311ab /include/net/sctp/sm.h
parent8d614ade511fef11f992d6a73e538d33b3b81f12 (diff)
SCTP: Fix to encode PROTOCOL VIOLATION error cause correctly
PROTOCOL VIOLATION error cause in ABORT is bad encode when make abort chunk. When SCTP encode ABORT chunk with PROTOCOL VIOLATION error cause, it just add the error messages to PROTOCOL VIOLATION error cause, the rest four bytes(struct sctp_paramhdr) is just add to the chunk, not change the length of error cause. This cause the ABORT chunk to be a bad format. The chunk is like this: ABORT chunk Chunk type: ABORT (6) Chunk flags: 0x00 Chunk length: 72 (*1) Protocol violation cause Cause code: Protocol violation (0x000d) Cause length: 62 (*2) Cause information: 5468652063756D756C61746976652074736E2061636B2062... Cause padding: 0000 [Needless] 00030010 Chunk Length(*1) = 72 but Cause length(*2) only 62, not include the extend 4 bytes. ((72 - sizeof(chunk_hdr)) = 68) != (62 +3) / 4 * 4 Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com> Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Diffstat (limited to 'include/net/sctp/sm.h')
-rw-r--r--include/net/sctp/sm.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/sctp/sm.h b/include/net/sctp/sm.h
index 73cb9943c8a8..991c85bb9e36 100644
--- a/include/net/sctp/sm.h
+++ b/include/net/sctp/sm.h
@@ -214,7 +214,7 @@ struct sctp_chunk *sctp_make_shutdown_ack(const struct sctp_association *asoc,
214 const struct sctp_chunk *); 214 const struct sctp_chunk *);
215struct sctp_chunk *sctp_make_shutdown_complete(const struct sctp_association *, 215struct sctp_chunk *sctp_make_shutdown_complete(const struct sctp_association *,
216 const struct sctp_chunk *); 216 const struct sctp_chunk *);
217void sctp_init_cause(struct sctp_chunk *, __be16 cause, const void *, size_t); 217void sctp_init_cause(struct sctp_chunk *, __be16 cause, size_t);
218struct sctp_chunk *sctp_make_abort(const struct sctp_association *, 218struct sctp_chunk *sctp_make_abort(const struct sctp_association *,
219 const struct sctp_chunk *, 219 const struct sctp_chunk *,
220 const size_t hint); 220 const size_t hint);