Skip to contentSkip to conversation

sctp: do not update a_rwnd if we are not issuing a sack

PATCH Applied Marcelo Ricardo Leitner 2 participants 2 messages Mar 18, 2016 – Mar 20, 2016

Subsystems (3)
lore
Share & tools
lore

Marcelo Ricardo Leitner

author maintainer
#0 lore raw

PATCH 1/1 sctp: do not update a_rwnd if we are not issuing a sack

The SACK can be lost pretty much elsewhere, but if its allocation fail, we know we are not sending it, so it is better to revert a_rwnd to its previous value as this may give it a chance to issue a window update later.

---
 net/sctp/sm_sideeffect.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
net/sctp/sm_sideeffect.c +5 -1
index 3c22c41a2bc2dc128d651f64b1a81036be22b9b3..7fe56d0acabf66cfd8fe29dfdb45f7620b470ac7 100644
@@ -215,10 +215,14 @@ static int sctp_gen_sack(struct sctp_association *asoc, int force,
 		sctp_add_cmd_sf(commands, SCTP_CMD_TIMER_RESTART,
 				SCTP_TO(SCTP_EVENT_TIMEOUT_SACK));
 	} else {
+		__u32 old_a_rwnd = asoc->a_rwnd;
+
 		asoc->a_rwnd = asoc->rwnd;
 		sack = sctp_make_sack(asoc);
-		if (!sack)
+		if (!sack) {
+			asoc->a_rwnd = old_a_rwnd;
 			goto nomem;
+		}
 
 		asoc->peer.sack_needed = 0;
 		asoc->peer.sack_cnt = 0;
Signature · 1 line
2.5.0
maintainer Applied
#1 lore raw

From: Marcelo Ricardo Leitner <[email protected]>
Date: Fri, 18 Mar 2016 18:39:18 -0300

Quoted 6 lines

The SACK can be lost pretty much elsewhere, but if its allocation fail, we know we are not sending it, so it is better to revert a_rwnd to its previous value as this may give it a chance to issue a window update later.

Applied.