Possible burst from TCP NewReno when a partial ACK is received

Noritoshi Demizu demizu at dd.iij4u.or.jp
Mon Jul 4 03:15:32 PDT 2005

I think TCP NewReno in DragonFlyBSD has a bug which may send
a burst of data when a partial ACK is received.

More precisely, when a partial ACK is received, if acked bytes is
larger than congestion window, new congestion window becomes awfully
huge value.

This bug is the same as the one reported in the following mail:

I think tcp_newreno_partial_ack() should be modified as below.
Through my experiences, I observed that in somecases (ocwnd > acked)
is false (I inserted printf() there for test).  Without the change
below, snd_cwnd would become awfully huge value.

Noritoshi Demizu

Index: netinet/tcp_input.c
RCS file: /home/cvsup/DragonFlyBSD/dcvs/src/sys/netinet/tcp_input.c,v
retrieving revision 1.60
diff -u -r1.60 tcp_input.c
--- netinet/tcp_input.c	10 May 2005 15:48:10 -0000	1.60
+++ netinet/tcp_input.c	4 Jul 2005 10:02:57 -0000
@@ -3108,7 +3108,10 @@
 	if (SEQ_GT(old_snd_nxt, tp->snd_nxt))
 		tp->snd_nxt = old_snd_nxt;
 	/* partial window deflation */
-	tp->snd_cwnd = ocwnd - acked + tp->t_maxseg;
+	if (ocwnd > acked)
+		tp->snd_cwnd = ocwnd - acked + tp->t_maxseg;
+	else
+		tp->snd_cwnd = tp->t_maxseg;

More information about the Bugs mailing list