runtime: duplicate ACK detection bug fix
@@ -332,9 +332,11 @@ void tcp_rx_conn(struct trans_entry *e, struct mbuf *m)
if (wraps_lt(c->pcb.snd_wl1, seq) ||
(c->pcb.snd_wl1 == seq &&
wraps_lte(c->pcb.snd_wl2, ack))) {
+ uint32_t old_wnd = c->pcb.snd_wnd;
c->pcb.snd_wnd = win > 1 ? win - 2 : 0; // reserve 1 byte for FIN and one byte for the sequence number on an RST packet
c->pcb.snd_wl1 = seq;
c->pcb.snd_wl2 = ack;
+ if (c->pcb.snd_wnd != old_wnd)
c->rep_acks = 0;
}
if (snd_was_full && !is_snd_full(c))
