]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - net/sctp/associola.c
sctp: stop pending timers and purge queues when peer restart asoc
[karo-tx-linux.git] / net / sctp / associola.c
index 525f97c467e97e3e04a3d279431fc0bf08ff0d2f..4a62888f2e43f43a7037f556257520a462d5ece2 100644 (file)
@@ -444,15 +444,7 @@ void sctp_association_free(struct sctp_association *asoc)
 
        asoc->peer.transport_count = 0;
 
-       /* Free any cached ASCONF_ACK chunk. */
-       sctp_assoc_free_asconf_acks(asoc);
-
-       /* Free the ASCONF queue. */
-       sctp_assoc_free_asconf_queue(asoc);
-
-       /* Free any cached ASCONF chunk. */
-       if (asoc->addip_last_asconf)
-               sctp_chunk_free(asoc->addip_last_asconf);
+       sctp_asconf_queue_teardown(asoc);
 
        /* AUTH - Free the endpoint shared keys */
        sctp_auth_destroy_keys(&asoc->endpoint_shared_keys);
@@ -1646,3 +1638,16 @@ struct sctp_chunk *sctp_assoc_lookup_asconf_ack(
 
        return NULL;
 }
+
+void sctp_asconf_queue_teardown(struct sctp_association *asoc)
+{
+       /* Free any cached ASCONF_ACK chunk. */
+       sctp_assoc_free_asconf_acks(asoc);
+
+       /* Free the ASCONF queue. */
+       sctp_assoc_free_asconf_queue(asoc);
+
+       /* Free any cached ASCONF chunk. */
+       if (asoc->addip_last_asconf)
+               sctp_chunk_free(asoc->addip_last_asconf);
+}