[SCTP]: correct the number of INIT retransmissions

We currently count the initial INIT/COOKIE_ECHO chunk toward the
retransmit count and thus sends a total of sctp_max_retrans_init chunks.
The correct behavior is to retransmit the chunk sctp_max_retrans_init in
addition to sending the original.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Vlad Yasevich 2006-01-30 15:59:54 -08:00 committed by David S. Miller
parent 7add2a4398
commit 81845c21dc
2 changed files with 4 additions and 4 deletions

View file

@ -5426,7 +5426,7 @@ out:
return err;
do_error:
if (asoc->init_err_counter + 1 >= asoc->max_init_attempts)
if (asoc->init_err_counter + 1 > asoc->max_init_attempts)
err = -ETIMEDOUT;
else
err = -ECONNREFUSED;