Skip to content

Commit

Permalink
[SCTP]: Add back the code that accounted for FORWARD_TSN parameter in…
Browse files Browse the repository at this point in the history
… INIT.

Some recent changes completely removed accounting for the FORWARD_TSN
parameter length in the INIT and INIT-ACK chunk.  This is wrong and
should be restored.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Vlad Yasevich authored and David S. Miller committed Jan 9, 2008
1 parent 6df9cfc commit 036b579
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions net/sctp/sm_make_chunk.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,9 @@ struct sctp_chunk *sctp_make_init(const struct sctp_association *asoc,
chunksize = sizeof(init) + addrs_len + SCTP_SAT_LEN(num_types);
chunksize += sizeof(ecap_param);

if (sctp_prsctp_enable)
chunksize += sizeof(prsctp_param);

/* ADDIP: Section 4.2.7:
* An implementation supporting this extension [ADDIP] MUST list
* the ASCONF,the ASCONF-ACK, and the AUTH chunks in its INIT and
Expand Down Expand Up @@ -369,6 +372,9 @@ struct sctp_chunk *sctp_make_init_ack(const struct sctp_association *asoc,
if (asoc->peer.ecn_capable)
chunksize += sizeof(ecap_param);

if (sctp_prsctp_enable)
chunksize += sizeof(prsctp_param);

if (sctp_addip_enable) {
extensions[num_ext] = SCTP_CID_ASCONF;
extensions[num_ext+1] = SCTP_CID_ASCONF_ACK;
Expand Down

0 comments on commit 036b579

Please sign in to comment.