aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/sm_make_chunk.c
diff options
context:
space:
mode:
authorVlad Yasevich <vladislav.yasevich@hp.com>2007-01-15 22:15:45 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2007-01-23 23:25:45 -0500
commitd023f629451ace6f37eb5d2cf29ddd24497c91dc (patch)
tree71a0ccd972f8365b9be17e6221100c5e767b7a74 /net/sctp/sm_make_chunk.c
parentebdfcad4dc2a6851f75fac0a3315046cbd9c4410 (diff)
[SCTP]: Verify some mandatory parameters.
Verify init_tag and a_rwnd mandatory parameters in INIT and INIT-ACK chunks. Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: Sridhar Samudrala <sri@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/sm_make_chunk.c')
-rw-r--r--net/sctp/sm_make_chunk.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index ea0f8fac3f01..0b1ddb1005ac 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -1775,7 +1775,9 @@ int sctp_verify_init(const struct sctp_association *asoc,
1775 1775
1776 /* Verify stream values are non-zero. */ 1776 /* Verify stream values are non-zero. */
1777 if ((0 == peer_init->init_hdr.num_outbound_streams) || 1777 if ((0 == peer_init->init_hdr.num_outbound_streams) ||
1778 (0 == peer_init->init_hdr.num_inbound_streams)) { 1778 (0 == peer_init->init_hdr.num_inbound_streams) ||
1779 (0 == peer_init->init_hdr.init_tag) ||
1780 (SCTP_DEFAULT_MINWINDOW > ntohl(peer_init->init_hdr.a_rwnd))) {
1779 1781
1780 sctp_process_inv_mandatory(asoc, chunk, errp); 1782 sctp_process_inv_mandatory(asoc, chunk, errp);
1781 return 0; 1783 return 0;