aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/sctp/associola.c9
-rw-r--r--net/sctp/sm_make_chunk.c6
2 files changed, 7 insertions, 8 deletions
diff --git a/net/sctp/associola.c b/net/sctp/associola.c
index 8472b8b349c4..abd51cef2413 100644
--- a/net/sctp/associola.c
+++ b/net/sctp/associola.c
@@ -599,11 +599,12 @@ struct sctp_transport *sctp_assoc_add_peer(struct sctp_association *asoc,
599 /* Check to see if this is a duplicate. */ 599 /* Check to see if this is a duplicate. */
600 peer = sctp_assoc_lookup_paddr(asoc, addr); 600 peer = sctp_assoc_lookup_paddr(asoc, addr);
601 if (peer) { 601 if (peer) {
602 /* An UNKNOWN state is only set on transports added by
603 * user in sctp_connectx() call. Such transports should be
604 * considered CONFIRMED per RFC 4960, Section 5.4.
605 */
602 if (peer->state == SCTP_UNKNOWN) { 606 if (peer->state == SCTP_UNKNOWN) {
603 if (peer_state == SCTP_ACTIVE) 607 peer->state = SCTP_ACTIVE;
604 peer->state = SCTP_ACTIVE;
605 if (peer_state == SCTP_UNCONFIRMED)
606 peer->state = SCTP_UNCONFIRMED;
607 } 608 }
608 return peer; 609 return peer;
609 } 610 }
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index fe94f42fa068..b599cbba4fbe 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -2321,12 +2321,10 @@ clean_up:
2321 /* Release the transport structures. */ 2321 /* Release the transport structures. */
2322 list_for_each_safe(pos, temp, &asoc->peer.transport_addr_list) { 2322 list_for_each_safe(pos, temp, &asoc->peer.transport_addr_list) {
2323 transport = list_entry(pos, struct sctp_transport, transports); 2323 transport = list_entry(pos, struct sctp_transport, transports);
2324 list_del_init(pos); 2324 if (transport->state != SCTP_ACTIVE)
2325 sctp_transport_free(transport); 2325 sctp_assoc_rm_peer(asoc, transport);
2326 } 2326 }
2327 2327
2328 asoc->peer.transport_count = 0;
2329
2330nomem: 2328nomem:
2331 return 0; 2329 return 0;
2332} 2330}