From 93e80dac7f3806d1da322155db91423b0cd7990f Mon Sep 17 00:00:00 2001 From: Vlad Yasevich Date: Thu, 18 Sep 2008 16:28:27 -0700 Subject: [PATCH] --- yaml --- r: 109852 b: refs/heads/master c: add52379dde2e5300e2d574b172e62c6cf43b3d3 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/net/sctp/associola.c | 9 +++++---- trunk/net/sctp/sm_make_chunk.c | 6 ++---- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index de096f99a379..b620a29869dd 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0ef46e285c062cbe35d60c0adbff96f530d31c86 +refs/heads/master: add52379dde2e5300e2d574b172e62c6cf43b3d3 diff --git a/trunk/net/sctp/associola.c b/trunk/net/sctp/associola.c index 8472b8b349c4..abd51cef2413 100644 --- a/trunk/net/sctp/associola.c +++ b/trunk/net/sctp/associola.c @@ -599,11 +599,12 @@ struct sctp_transport *sctp_assoc_add_peer(struct sctp_association *asoc, /* Check to see if this is a duplicate. */ peer = sctp_assoc_lookup_paddr(asoc, addr); if (peer) { + /* An UNKNOWN state is only set on transports added by + * user in sctp_connectx() call. Such transports should be + * considered CONFIRMED per RFC 4960, Section 5.4. + */ if (peer->state == SCTP_UNKNOWN) { - if (peer_state == SCTP_ACTIVE) - peer->state = SCTP_ACTIVE; - if (peer_state == SCTP_UNCONFIRMED) - peer->state = SCTP_UNCONFIRMED; + peer->state = SCTP_ACTIVE; } return peer; } diff --git a/trunk/net/sctp/sm_make_chunk.c b/trunk/net/sctp/sm_make_chunk.c index fe94f42fa068..b599cbba4fbe 100644 --- a/trunk/net/sctp/sm_make_chunk.c +++ b/trunk/net/sctp/sm_make_chunk.c @@ -2321,12 +2321,10 @@ int sctp_process_init(struct sctp_association *asoc, sctp_cid_t cid, /* Release the transport structures. */ list_for_each_safe(pos, temp, &asoc->peer.transport_addr_list) { transport = list_entry(pos, struct sctp_transport, transports); - list_del_init(pos); - sctp_transport_free(transport); + if (transport->state != SCTP_ACTIVE) + sctp_assoc_rm_peer(asoc, transport); } - asoc->peer.transport_count = 0; - nomem: return 0; }