philip's inet tcp fix.

This commit is contained in:
Ben Gras 2010-02-04 22:06:10 +00:00
parent cb2ee95cf9
commit 157e82e76a

View file

@ -540,7 +540,7 @@ u16_t new_win;
acc_t *pack; acc_t *pack;
clock_t retrans_time, curr_time, rtt, artt, drtt, srtt; clock_t retrans_time, curr_time, rtt, artt, drtt, srtt;
u32_t queue_lo, queue_hi; u32_t queue_lo, queue_hi;
u16_t mss, cthresh; u16_t mss, cthresh, new_cthresh;
unsigned window; unsigned window;
DBLOCK(0x10, printf("tcp_release_retrans, conn[%d]: ack %lu, win %u\n", DBLOCK(0x10, printf("tcp_release_retrans, conn[%d]: ack %lu, win %u\n",
@ -640,9 +640,11 @@ u16_t new_win;
cthresh= tcp_conn->tc_snd_cthresh; cthresh= tcp_conn->tc_snd_cthresh;
if (window > cthresh) if (window > cthresh)
{ {
cthresh += tcp_conn->tc_snd_cinc; new_cthresh= cthresh + tcp_conn->tc_snd_cinc;
tcp_conn->tc_snd_cthresh= cthresh; if (new_cthresh < cthresh)
window= cthresh; new_cthresh= cthresh; /* overflow */
tcp_conn->tc_snd_cthresh= new_cthresh;
window= new_cthresh;
} }
/* If the window is larger than the window advertised by the /* If the window is larger than the window advertised by the