diff options
author | Wei Yongjun <yjwei@cn.fujitsu.com> | 2010-04-30 22:38:53 -0400 |
---|---|---|
committer | Vlad Yasevich <vladislav.yasevich@hp.com> | 2010-04-30 22:38:53 -0400 |
commit | bc4f841a05364b2572bcc266e9fd7e9cf5f06d5b (patch) | |
tree | 4d49c9d95422f5028b41920a960c8f4b33e4e76c /net | |
parent | 6429d3dc4bd6251b01c11b851e23a4d60f079e06 (diff) |
sctp: fix to retranmit at least one DATA chunk
While doing retranmit, if control chunk exists, such as
FORWARD TSN chunk, and the DATA chunk can not be bundled with
this control chunk because of PMTU limit, no DATA chunk
will be retranmitted in the current implementation. This
patch makes sure to retranmit at least one DATA chunk in this case.
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/sctp/outqueue.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c index 16d451a62b3f..e333d5833616 100644 --- a/net/sctp/outqueue.c +++ b/net/sctp/outqueue.c | |||
@@ -598,11 +598,23 @@ static int sctp_outq_flush_rtx(struct sctp_outq *q, struct sctp_packet *pkt, | |||
598 | if (fast_rtx && !chunk->fast_retransmit) | 598 | if (fast_rtx && !chunk->fast_retransmit) |
599 | continue; | 599 | continue; |
600 | 600 | ||
601 | redo: | ||
601 | /* Attempt to append this chunk to the packet. */ | 602 | /* Attempt to append this chunk to the packet. */ |
602 | status = sctp_packet_append_chunk(pkt, chunk); | 603 | status = sctp_packet_append_chunk(pkt, chunk); |
603 | 604 | ||
604 | switch (status) { | 605 | switch (status) { |
605 | case SCTP_XMIT_PMTU_FULL: | 606 | case SCTP_XMIT_PMTU_FULL: |
607 | if (!pkt->has_data && !pkt->has_cookie_echo) { | ||
608 | /* If this packet did not contain DATA then | ||
609 | * retransmission did not happen, so do it | ||
610 | * again. We'll ignore the error here since | ||
611 | * control chunks are already freed so there | ||
612 | * is nothing we can do. | ||
613 | */ | ||
614 | sctp_packet_transmit(pkt); | ||
615 | goto redo; | ||
616 | } | ||
617 | |||
606 | /* Send this packet. */ | 618 | /* Send this packet. */ |
607 | error = sctp_packet_transmit(pkt); | 619 | error = sctp_packet_transmit(pkt); |
608 | 620 | ||