|
@@ -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;
|
|
|
}
|