From: Vlad Yasevich <vladislav.yasevich@hp.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, lksctp-developers@lists.sourceforge.net,
Vlad Yasevich <vladislav.yasevich@hp.com>
Subject: [PATCH 3/3] [SCTP]: Add back the code that accounted for FORWARD_TSN parameter in INIT.
Date: Fri, 4 Jan 2008 14:45:46 -0500 [thread overview]
Message-ID: <1199475946-11103-4-git-send-email-vladislav.yasevich@hp.com> (raw)
In-Reply-To: <1199475946-11103-1-git-send-email-vladislav.yasevich@hp.com>
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>
---
net/sctp/sm_make_chunk.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index ed7c9e3..3cc629d 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -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
@@ -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;
--
1.5.3.5
next prev parent reply other threads:[~2008-01-04 19:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-04 19:45 [PATCH 0/3] [SCTP] AUTH Bug fixes Vlad Yasevich
2008-01-04 19:45 ` [PATCH 1/3] [SCTP]: Fix the name of the authentication event Vlad Yasevich
2008-01-07 8:27 ` David Miller
2008-01-04 19:45 ` [PATCH 2/3] [SCTP]: Correctly handle AUTH parameters in unexpected INIT Vlad Yasevich
2008-01-07 8:27 ` David Miller
2008-01-04 19:45 ` Vlad Yasevich [this message]
2008-01-07 8:28 ` [PATCH 3/3] [SCTP]: Add back the code that accounted for FORWARD_TSN parameter in INIT David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1199475946-11103-4-git-send-email-vladislav.yasevich@hp.com \
--to=vladislav.yasevich@hp.com \
--cc=davem@davemloft.net \
--cc=lksctp-developers@lists.sourceforge.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox