aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/outqueue.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sctp/outqueue.c')
-rw-r--r--net/sctp/outqueue.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c
index e5faa351aaad..739582415bf6 100644
--- a/net/sctp/outqueue.c
+++ b/net/sctp/outqueue.c
@@ -416,7 +416,8 @@ void sctp_retransmit_mark(struct sctp_outq *q,
416 * (Section 7.2.4)), add the data size of those 416 * (Section 7.2.4)), add the data size of those
417 * chunks to the rwnd. 417 * chunks to the rwnd.
418 */ 418 */
419 q->asoc->peer.rwnd += sctp_data_size(chunk); 419 q->asoc->peer.rwnd += (sctp_data_size(chunk) +
420 sizeof(struct sk_buff));
420 q->outstanding_bytes -= sctp_data_size(chunk); 421 q->outstanding_bytes -= sctp_data_size(chunk);
421 transport->flight_size -= sctp_data_size(chunk); 422 transport->flight_size -= sctp_data_size(chunk);
422 423
@@ -467,6 +468,7 @@ void sctp_retransmit(struct sctp_outq *q, struct sctp_transport *transport,
467 468
468 switch(reason) { 469 switch(reason) {
469 case SCTP_RTXR_T3_RTX: 470 case SCTP_RTXR_T3_RTX:
471 SCTP_INC_STATS(SCTP_MIB_T3_RETRANSMITS);
470 sctp_transport_lower_cwnd(transport, SCTP_LOWER_CWND_T3_RTX); 472 sctp_transport_lower_cwnd(transport, SCTP_LOWER_CWND_T3_RTX);
471 /* Update the retran path if the T3-rtx timer has expired for 473 /* Update the retran path if the T3-rtx timer has expired for
472 * the current retran path. 474 * the current retran path.
@@ -475,12 +477,15 @@ void sctp_retransmit(struct sctp_outq *q, struct sctp_transport *transport,
475 sctp_assoc_update_retran_path(transport->asoc); 477 sctp_assoc_update_retran_path(transport->asoc);
476 break; 478 break;
477 case SCTP_RTXR_FAST_RTX: 479 case SCTP_RTXR_FAST_RTX:
480 SCTP_INC_STATS(SCTP_MIB_FAST_RETRANSMITS);
478 sctp_transport_lower_cwnd(transport, SCTP_LOWER_CWND_FAST_RTX); 481 sctp_transport_lower_cwnd(transport, SCTP_LOWER_CWND_FAST_RTX);
479 fast_retransmit = 1; 482 fast_retransmit = 1;
480 break; 483 break;
481 case SCTP_RTXR_PMTUD: 484 case SCTP_RTXR_PMTUD:
482 default: 485 SCTP_INC_STATS(SCTP_MIB_PMTUD_RETRANSMITS);
483 break; 486 break;
487 default:
488 BUG();
484 } 489 }
485 490
486 sctp_retransmit_mark(q, transport, fast_retransmit); 491 sctp_retransmit_mark(q, transport, fast_retransmit);
@@ -691,7 +696,8 @@ int sctp_outq_flush(struct sctp_outq *q, int rtx_timeout)
691 696
692 if (!new_transport) { 697 if (!new_transport) {
693 new_transport = asoc->peer.active_path; 698 new_transport = asoc->peer.active_path;
694 } else if (new_transport->state == SCTP_INACTIVE) { 699 } else if ((new_transport->state == SCTP_INACTIVE) ||
700 (new_transport->state == SCTP_UNCONFIRMED)) {
695 /* If the chunk is Heartbeat or Heartbeat Ack, 701 /* If the chunk is Heartbeat or Heartbeat Ack,
696 * send it to chunk->transport, even if it's 702 * send it to chunk->transport, even if it's
697 * inactive. 703 * inactive.
@@ -848,7 +854,8 @@ int sctp_outq_flush(struct sctp_outq *q, int rtx_timeout)
848 */ 854 */
849 new_transport = chunk->transport; 855 new_transport = chunk->transport;
850 if (!new_transport || 856 if (!new_transport ||
851 new_transport->state == SCTP_INACTIVE) 857 ((new_transport->state == SCTP_INACTIVE) ||
858 (new_transport->state == SCTP_UNCONFIRMED)))
852 new_transport = asoc->peer.active_path; 859 new_transport = asoc->peer.active_path;
853 860
854 /* Change packets if necessary. */ 861 /* Change packets if necessary. */
@@ -1464,7 +1471,8 @@ static void sctp_check_transmitted(struct sctp_outq *q,
1464 /* Mark the destination transport address as 1471 /* Mark the destination transport address as
1465 * active if it is not so marked. 1472 * active if it is not so marked.
1466 */ 1473 */
1467 if (transport->state == SCTP_INACTIVE) { 1474 if ((transport->state == SCTP_INACTIVE) ||
1475 (transport->state == SCTP_UNCONFIRMED)) {
1468 sctp_assoc_control_transport( 1476 sctp_assoc_control_transport(
1469 transport->asoc, 1477 transport->asoc,
1470 transport, 1478 transport,