mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-04 05:39:53 +00:00
Ingress TCP keep-alive with garbage byte support.
This commit is contained in:
parent
515fb5a3fd
commit
b9ebcd7738
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user