Skip to contentSkip to conversation

sctp: fix to retranmit at least one DATA chunk

PATCH Wei Yongjun 1 participant 1 message Jan 15, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

While doing retranmit, if control chunk is exists, such as FORWARD TSN chunk, and the DATA chunk can not be bundled with the control chunk because the limit of PMTU, none DATA chunk will be retranmitted in the current implementation. This patch fix to retranmit at least one DATA chunk in this case.

---
 net/sctp/outqueue.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)
net/sctp/outqueue.c +9 -2
index 8092032..61cd7f1 100644
@@ -609,13 +609,20 @@ 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:
-			/* Send this packet.  */
-			error = sctp_packet_transmit(pkt);
+			if (!pkt->has_data && !pkt->has_cookie_echo) {
+				/* Send a control chunk. */
+				error = sctp_packet_transmit(pkt);
+				goto redo;
+			} else {
+				/* Send this packet.  */
+				error = sctp_packet_transmit(pkt);
+			}
 
 			/* If we are retransmitting, we should only
 			 * send a single packet.
Signature · 1 line
1.6.2.2