aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp
diff options
context:
space:
mode:
authorWei Yongjun <yjwei@cn.fujitsu.com>2007-08-06 01:55:58 -0400
committerVlad Yasevich <vladislav.yasevich@hp.com>2007-08-30 16:44:27 -0400
commitcb243a1a9fef4aaff262a5dd14f987070d37229b (patch)
tree5f15c06b52e98964070e56aaa6f8997ebf5f47ed /net/sctp
parent609ee4679b8a0831257552dd2b0e54f509ba0c77 (diff)
SCTP: Fix to handle invalid parameter length correctly
If an INIT with invalid parameter length look like this: Parameter Type : 1 Parameter Length: 800 and not contain any payload, SCTP will ignore this parameter and send back a INIT-ACK. This patch is fix to handle this invalid parameter length correctly. Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com> Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Diffstat (limited to 'net/sctp')
-rw-r--r--net/sctp/sm_make_chunk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index adc5e5934728..79856c924525 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -1833,7 +1833,7 @@ int sctp_verify_init(const struct sctp_association *asoc,
1833 * VIOLATION error. We build the ERROR chunk here and let the normal 1833 * VIOLATION error. We build the ERROR chunk here and let the normal
1834 * error handling code build and send the packet. 1834 * error handling code build and send the packet.
1835 */ 1835 */
1836 if (param.v < (void*)chunk->chunk_end - sizeof(sctp_paramhdr_t)) { 1836 if (param.v != (void*)chunk->chunk_end) {
1837 sctp_process_inv_paramlength(asoc, param.p, chunk, errp); 1837 sctp_process_inv_paramlength(asoc, param.p, chunk, errp);
1838 return 0; 1838 return 0;
1839 } 1839 }