Ingress TCP keep-alive with garbage byte support.

This commit is contained in:
likewise 2004-08-17 09:32:31 +00:00
parent 515fb5a3fd
commit b9ebcd7738

View File

@ -1162,6 +1162,11 @@ tcp_receive(struct tcp_pcb *pcb)
#endif /* TCP_QUEUE_OOSEQ */ #endif /* TCP_QUEUE_OOSEQ */
} }
} else {
if (TCP_SEQ_GT(pcb->rcv_nxt, seqno) ||
TCP_SEQ_GEQ(seqno, pcb->rcv_nxt + pcb->rcv_wnd)) {
tcp_ack_now(pcb);
}
} }
} else { } else {
/* Segments with length 0 is taken care of here. Segments that /* Segments with length 0 is taken care of here. Segments that
@ -1201,7 +1206,7 @@ tcp_parseopt(struct tcp_pcb *pcb)
++c; ++c;
/* NOP option. */ /* NOP option. */
} else if (opt == 0x02 && } else if (opt == 0x02 &&
opts[c + 1] == 0x04) { opts[c + 1] == 0x04) {
/* An MSS option with the right option length. */ /* An MSS option with the right option length. */
mss = (opts[c + 2] << 8) | opts[c + 3]; mss = (opts[c + 2] << 8) | opts[c + 3];
pcb->mss = mss > TCP_MSS? TCP_MSS: mss; pcb->mss = mss > TCP_MSS? TCP_MSS: mss;