summaryrefslogtreecommitdiffstats
path: root/net/sctp
diff options
context:
space:
mode:
authorVlad Yasevich <vladislav.yasevich@hp.com>2007-03-19 17:01:17 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2007-03-20 00:09:43 -0700
commit0b58a811461ccf3cf848aba4cc192538fd3b0516 (patch)
treee8ada90819aabdcc2041a5637c7e6f44446cc36b /net/sctp
parentc577c2b99387b5ff8607d42d6eaff9ec024d4773 (diff)
downloadkernel-crypto-0b58a811461ccf3cf848aba4cc192538fd3b0516.tar.gz
kernel-crypto-0b58a811461ccf3cf848aba4cc192538fd3b0516.tar.xz
kernel-crypto-0b58a811461ccf3cf848aba4cc192538fd3b0516.zip
[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@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')
-rw-r--r--net/sctp/associola.c6
-rw-r--r--net/sctp/ulpqueue.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/net/sctp/associola.c b/net/sctp/associola.c
index fa82b73c965..2505cd3b8d2 100644
--- a/net/sctp/associola.c
+++ b/net/sctp/associola.c
@@ -1063,6 +1063,12 @@ void sctp_assoc_update(struct sctp_association *asoc,
*/
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 f4759a9bdae..bfb197e37da 100644
--- a/net/sctp/ulpqueue.c
+++ b/net/sctp/ulpqueue.c
@@ -73,7 +73,7 @@ struct sctp_ulpq *sctp_ulpq_init(struct sctp_ulpq *ulpq,
/* 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;