]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/sctp/sm_sideeffect.c
Merge tag 'iwlwifi-next-for-kalle-2016-01-07_2' of https://git.kernel.org/pub/scm...
[karo-tx-linux.git] / net / sctp / sm_sideeffect.c
index 6098d4c42fa91287d3cde36ac05d860f76d4fe32..4f170ad38ff4f7d345d8e3a3fee7d691df64d9cb 100644 (file)
@@ -477,6 +477,8 @@ static void sctp_do_8_2_transport_strike(sctp_cmd_seq_t *commands,
                                         struct sctp_transport *transport,
                                         int is_hb)
 {
+       struct net *net = sock_net(asoc->base.sk);
+
        /* The check for association's overall error counter exceeding the
         * threshold is done in the state function.
         */
@@ -503,7 +505,8 @@ static void sctp_do_8_2_transport_strike(sctp_cmd_seq_t *commands,
         * is SCTP_ACTIVE, then mark this transport as Partially Failed,
         * see SCTP Quick Failover Draft, section 5.1
         */
-       if ((transport->state == SCTP_ACTIVE) &&
+       if (net->sctp.pf_enable &&
+          (transport->state == SCTP_ACTIVE) &&
           (asoc->pf_retrans < transport->pathmaxrxt) &&
           (transport->error_count > asoc->pf_retrans)) {
 
@@ -863,7 +866,6 @@ static void sctp_cmd_delete_tcb(sctp_cmd_seq_t *cmds,
            (!asoc->temp) && (sk->sk_shutdown != SHUTDOWN_MASK))
                return;
 
-       sctp_unhash_established(asoc);
        sctp_association_free(asoc);
 }
 
@@ -1266,7 +1268,6 @@ static int sctp_cmd_interpreter(sctp_event_t event_type,
                        asoc = cmd->obj.asoc;
                        BUG_ON(asoc->peer.primary_path == NULL);
                        sctp_endpoint_add_asoc(ep, asoc);
-                       sctp_hash_established(asoc);
                        break;
 
                case SCTP_CMD_UPDATE_ASSOC: