This is necessary so the peer can detect "triplicate ACKs", which signal dropped packets, and at the
same time keeps the TCP self-clocking active.
#endif
if(!acceptable) {
- debug("Packet not acceptable, %u <= %u + %zu < %u\n", c->rcv.nxt, hdr.seq, len, c->rcv.nxt + c->rcv.wnd);
+ debug("Packet not acceptable, %u <= %u + %zu < %u\n", c->rcv.nxt, hdr.seq, len, c->rcv.nxt + c->rcv.wnd);
// Ignore unacceptable RST packets.
if(hdr.ctl & RST)
return 0;
// Otherwise, send an ACK back in the hope things improve.
- goto ack;
+ ack(c, true);
+ return 0;
}
c->snd.wnd = hdr.wnd; // TODO: move below