From: Xin Long <lucien.xin@gmail.com>
To: network dev <netdev@vger.kernel.org>
Cc: mleitner@redhat.com, davem@davemloft.net
Subject: [PATCH net] sctp: partial chunk should be drop without sending abort packet
Date: Mon, 24 Aug 2015 18:08:30 +0800 [thread overview]
Message-ID: <88918657d985bc0e55e64ca232dcd5f2b76b7cb4.1440410910.git.lucien.xin@gmail.com> (raw)
as RFC 4960, 6.10 said, *if the receiver detects a partial chunk, it MUST drop
the chunk*, we should not send the abort. but if we put this discard to inside
state machine, it will send abort.
so we just drop the partial chunk there, never let this chunk go into the state
machine.
Signed-off-by: Xin Long <lucien.xin@gmail.com>
---
net/sctp/inqueue.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/sctp/inqueue.c b/net/sctp/inqueue.c
index 7e8a16c..a22ca57 100644
--- a/net/sctp/inqueue.c
+++ b/net/sctp/inqueue.c
@@ -183,9 +183,9 @@ struct sctp_chunk *sctp_inq_pop(struct sctp_inq *queue)
/* This is not a singleton */
chunk->singleton = 0;
} else if (chunk->chunk_end > skb_tail_pointer(chunk->skb)) {
- /* Discard inside state machine. */
- chunk->pdiscard = 1;
- chunk->chunk_end = skb_tail_pointer(chunk->skb);
+ sctp_chunk_free(chunk);
+ chunk = queue->in_progress = NULL;
+ return NULL;
} else {
/* We are at the end of the packet, so mark the chunk
* in case we need to send a SACK.
--
2.1.0
next reply other threads:[~2015-08-24 10:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-24 10:08 Xin Long [this message]
2015-08-24 12:47 ` [PATCH net] sctp: partial chunk should be drop without sending abort packet Marcelo Ricardo Leitner
2015-08-24 18:22 ` Daniel Borkmann
2015-08-24 18:01 ` Vlad Yasevich
2015-08-27 13:41 ` lucien xin
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=88918657d985bc0e55e64ca232dcd5f2b76b7cb4.1440410910.git.lucien.xin@gmail.com \
--to=lucien.xin@gmail.com \
--cc=davem@davemloft.net \
--cc=mleitner@redhat.com \
--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;
as well as URLs for NNTP newsgroup(s).