X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=net%2Fsctp%2Fsm_statefuns.c;h=d247ed4ee42369c69aa8c8a3f26c83a370e906fc;hb=fa746aee336fedfe25e6945e5967399966948420;hp=5ebbe808d801030341fbe3bd3cf7ff49b1c2d6f2;hpb=9abed245a6dc94c32b2f45a1ecc51a0829d11470;p=safe%2Fjmp%2Flinux-2.6 diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c index 5ebbe80..d247ed4 100644 --- a/net/sctp/sm_statefuns.c +++ b/net/sctp/sm_statefuns.c @@ -959,7 +959,7 @@ sctp_disposition_t sctp_sf_sendbeat_8_3(const struct sctp_endpoint *ep, { struct sctp_transport *transport = (struct sctp_transport *) arg; - if (asoc->overall_error_count >= asoc->max_retrans) { + if (asoc->overall_error_count > asoc->max_retrans) { sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR, SCTP_ERROR(ETIMEDOUT)); /* CMD_ASSOC_FAILED calls CMD_DELETE_TCB. */ @@ -1146,7 +1146,7 @@ sctp_disposition_t sctp_sf_backbeat_8_3(const struct sctp_endpoint *ep, /* Check if the timestamp looks valid. */ if (time_after(hbinfo->sent_at, jiffies) || time_after(jiffies, hbinfo->sent_at + max_interval)) { - SCTP_DEBUG_PRINTK("%s: HEARTBEAT ACK with invalid timestamp" + SCTP_DEBUG_PRINTK("%s: HEARTBEAT ACK with invalid timestamp " "received for transport: %p\n", __FUNCTION__, link); return SCTP_DISPOSITION_DISCARD; @@ -1309,26 +1309,6 @@ static void sctp_tietags_populate(struct sctp_association *new_asoc, new_asoc->c.initial_tsn = asoc->c.initial_tsn; } -static void sctp_auth_params_populate(struct sctp_association *new_asoc, - const struct sctp_association *asoc) -{ - /* Only perform this if AUTH extension is enabled */ - if (!sctp_auth_enable) - return; - - /* We need to provide the same parameter information as - * was in the original INIT. This means that we need to copy - * the HMACS, CHUNKS, and RANDOM parameter from the original - * assocaition. - */ - memcpy(new_asoc->c.auth_random, asoc->c.auth_random, - sizeof(asoc->c.auth_random)); - memcpy(new_asoc->c.auth_hmacs, asoc->c.auth_hmacs, - sizeof(asoc->c.auth_hmacs)); - memcpy(new_asoc->c.auth_chunks, asoc->c.auth_chunks, - sizeof(asoc->c.auth_chunks)); -} - /* * Compare vtag/tietag values to determine unexpected COOKIE-ECHO * handling action. @@ -1486,8 +1466,6 @@ static sctp_disposition_t sctp_sf_do_unexpected_init( sctp_tietags_populate(new_asoc, asoc); - sctp_auth_params_populate(new_asoc, asoc); - /* B) "Z" shall respond immediately with an INIT ACK chunk. */ /* If there are errors need to be reported for unknown parameters,