Make TCP_OOSEQ_MAX_BYTES and TCP_OOSEQ_MAX_PBUFS work independently

This commit is contained in:
goldsimon 2017-09-21 09:52:51 +02:00
parent 6d2b181cc0
commit 8f459cc242

View File

@ -1786,8 +1786,12 @@ tcp_receive(struct tcp_pcb *pcb)
prev = NULL;
for (next = pcb->ooseq; next != NULL; prev = next, next = next->next) {
struct pbuf *p = next->p;
#if TCP_OOSEQ_MAX_BYTES
ooseq_blen += p->tot_len;
#endif
#if TCP_OOSEQ_MAX_PBUFS
ooseq_qlen += pbuf_clen(p);
#endif
if ((ooseq_blen > TCP_OOSEQ_MAX_BYTES) ||
(ooseq_qlen > TCP_OOSEQ_MAX_PBUFS)) {
#if LWIP_TCP_SACK_OUT