sctp: avoid refreshing heartbeat timer too often
[cascardo/linux.git] / net / sctp / sm_make_chunk.c
index e47abf2..56f364d 100644 (file)
@@ -1849,7 +1849,8 @@ no_hmac:
        /* Also, add the destination address. */
        if (list_empty(&retval->base.bind_addr.address_list)) {
                sctp_add_bind_addr(&retval->base.bind_addr, &chunk->dest,
-                               SCTP_ADDR_SRC, GFP_ATOMIC);
+                                  sizeof(chunk->dest), SCTP_ADDR_SRC,
+                                  GFP_ATOMIC);
        }
 
        retval->next_tsn = retval->c.initial_tsn;
@@ -3079,8 +3080,7 @@ static __be16 sctp_process_asconf_param(struct sctp_association *asoc,
                        return SCTP_ERROR_RSRC_LOW;
 
                /* Start the heartbeat timer. */
-               if (!mod_timer(&peer->hb_timer, sctp_transport_timeout(peer)))
-                       sctp_transport_hold(peer);
+               sctp_transport_reset_hb_timer(peer);
                asoc->new_transport = peer;
                break;
        case SCTP_PARAM_DEL_IP: