Skip to content

Commit

Permalink
sctp: fix to retranmit at least one DATA chunk
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wei Yongjun authored and Vlad Yasevich committed May 1, 2010
1 parent 6429d3d commit bc4f841
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions net/sctp/outqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -598,11 +598,23 @@ static int sctp_outq_flush_rtx(struct sctp_outq *q, struct sctp_packet *pkt,
if (fast_rtx && !chunk->fast_retransmit)
continue;

redo:
/* Attempt to append this chunk to the packet. */
status = sctp_packet_append_chunk(pkt, chunk);

switch (status) {
case SCTP_XMIT_PMTU_FULL:
if (!pkt->has_data && !pkt->has_cookie_echo) {
/* If this packet did not contain DATA then
* retransmission did not happen, so do it
* again. We'll ignore the error here since
* control chunks are already freed so there
* is nothing we can do.
*/
sctp_packet_transmit(pkt);
goto redo;
}

/* Send this packet. */
error = sctp_packet_transmit(pkt);

Expand Down

0 comments on commit bc4f841

Please sign in to comment.