diff options
Diffstat (limited to 'net/sctp/outqueue.c')
-rw-r--r-- | net/sctp/outqueue.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c index d03682109b7..6edd7deb1ad 100644 --- a/net/sctp/outqueue.c +++ b/net/sctp/outqueue.c | |||
@@ -411,8 +411,7 @@ void sctp_retransmit_mark(struct sctp_outq *q, | |||
411 | chunk->transport->flight_size -= | 411 | chunk->transport->flight_size -= |
412 | sctp_data_size(chunk); | 412 | sctp_data_size(chunk); |
413 | q->outstanding_bytes -= sctp_data_size(chunk); | 413 | q->outstanding_bytes -= sctp_data_size(chunk); |
414 | q->asoc->peer.rwnd += (sctp_data_size(chunk) + | 414 | q->asoc->peer.rwnd += sctp_data_size(chunk); |
415 | sizeof(struct sk_buff)); | ||
416 | } | 415 | } |
417 | continue; | 416 | continue; |
418 | } | 417 | } |
@@ -432,8 +431,7 @@ void sctp_retransmit_mark(struct sctp_outq *q, | |||
432 | * (Section 7.2.4)), add the data size of those | 431 | * (Section 7.2.4)), add the data size of those |
433 | * chunks to the rwnd. | 432 | * chunks to the rwnd. |
434 | */ | 433 | */ |
435 | q->asoc->peer.rwnd += (sctp_data_size(chunk) + | 434 | q->asoc->peer.rwnd += sctp_data_size(chunk); |
436 | sizeof(struct sk_buff)); | ||
437 | q->outstanding_bytes -= sctp_data_size(chunk); | 435 | q->outstanding_bytes -= sctp_data_size(chunk); |
438 | if (chunk->transport) | 436 | if (chunk->transport) |
439 | transport->flight_size -= sctp_data_size(chunk); | 437 | transport->flight_size -= sctp_data_size(chunk); |
@@ -754,6 +752,16 @@ static int sctp_outq_flush(struct sctp_outq *q, int rtx_timeout) | |||
754 | */ | 752 | */ |
755 | 753 | ||
756 | list_for_each_entry_safe(chunk, tmp, &q->control_chunk_list, list) { | 754 | list_for_each_entry_safe(chunk, tmp, &q->control_chunk_list, list) { |
755 | /* RFC 5061, 5.3 | ||
756 | * F1) This means that until such time as the ASCONF | ||
757 | * containing the add is acknowledged, the sender MUST | ||
758 | * NOT use the new IP address as a source for ANY SCTP | ||
759 | * packet except on carrying an ASCONF Chunk. | ||
760 | */ | ||
761 | if (asoc->src_out_of_asoc_ok && | ||
762 | chunk->chunk_hdr->type != SCTP_CID_ASCONF) | ||
763 | continue; | ||
764 | |||
757 | list_del_init(&chunk->list); | 765 | list_del_init(&chunk->list); |
758 | 766 | ||
759 | /* Pick the right transport to use. */ | 767 | /* Pick the right transport to use. */ |
@@ -881,6 +889,9 @@ static int sctp_outq_flush(struct sctp_outq *q, int rtx_timeout) | |||
881 | } | 889 | } |
882 | } | 890 | } |
883 | 891 | ||
892 | if (q->asoc->src_out_of_asoc_ok) | ||
893 | goto sctp_flush_out; | ||
894 | |||
884 | /* Is it OK to send data chunks? */ | 895 | /* Is it OK to send data chunks? */ |
885 | switch (asoc->state) { | 896 | switch (asoc->state) { |
886 | case SCTP_STATE_COOKIE_ECHOED: | 897 | case SCTP_STATE_COOKIE_ECHOED: |