[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1174329483.3187.11.camel@w-sridhar2.beaverton.ibm.com>
Date: Mon, 19 Mar 2007 11:38:02 -0700
From: Sridhar Samudrala <sri@...ibm.com>
To: davem@...emloft.net
Cc: netdev@...r.kernel.org, lksctp-developers@...ts.sourceforge.net
Subject: [PATCH 1/3][SCTP]: Clean up stale data during association restart
Dave,
Please consider the following 3 SCTP bug fix patches for
inclusion in 2.6.21.
Thanks
Sridhar
[SCTP]: Clean up stale data during association restart
During association restart we may have stale data sitting
on the ULP queue waiting for ordering or reassembly. This
data may cause severe problems if not cleaned up. In particular
stale data pending ordering may cause problems with receive
window exhaustion if our peer has decided to restart the
association.
Signed-off-by: Vlad Yasevich <vladislav.yasevich@...com>
Signed-off-by: Sridhar Samudrala <sri@...ibm.com>
---
include/net/sctp/ulpqueue.h | 1 +
net/sctp/associola.c | 6 ++++++
net/sctp/ulpqueue.c | 2 +-
3 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/include/net/sctp/ulpqueue.h b/include/net/sctp/ulpqueue.h
index a43c878..ab26ab3 100644
--- a/include/net/sctp/ulpqueue.h
+++ b/include/net/sctp/ulpqueue.h
@@ -59,6 +59,7 @@ struct sctp_ulpq {
/* Prototypes. */
struct sctp_ulpq *sctp_ulpq_init(struct sctp_ulpq *,
struct sctp_association *);
+void sctp_ulpq_flush(struct sctp_ulpq *ulpq);
void sctp_ulpq_free(struct sctp_ulpq *);
/* Add a new DATA chunk for processing. */
diff --git a/net/sctp/associola.c b/net/sctp/associola.c
index fa82b73..2505cd3 100644
--- a/net/sctp/associola.c
+++ b/net/sctp/associola.c
@@ -1063,6 +1063,12 @@ void sctp_assoc_update(struct sctp_assoc
*/
sctp_ssnmap_clear(asoc->ssnmap);
+ /* Flush the ULP reassembly and ordered queue.
+ * Any data there will now be stale and will
+ * cause problems.
+ */
+ sctp_ulpq_flush(&asoc->ulpq);
+
} else {
/* Add any peer addresses from the new association. */
list_for_each(pos, &new->peer.transport_addr_list) {
diff --git a/net/sctp/ulpqueue.c b/net/sctp/ulpqueue.c
index f4759a9..bfb197e 100644
--- a/net/sctp/ulpqueue.c
+++ b/net/sctp/ulpqueue.c
@@ -73,7 +73,7 @@ struct sctp_ulpq *sctp_ulpq_init(struct
/* Flush the reassembly and ordering queues. */
-static void sctp_ulpq_flush(struct sctp_ulpq *ulpq)
+void sctp_ulpq_flush(struct sctp_ulpq *ulpq)
{
struct sk_buff *skb;
struct sctp_ulpevent *event;
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists