[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #50075] TCP_OVERSIZE fails on tcp_rexmit_rto()
From: |
Axel Lin |
Subject: |
[lwip-devel] [bug #50075] TCP_OVERSIZE fails on tcp_rexmit_rto() |
Date: |
Wed, 18 Jan 2017 20:54:15 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36 |
Follow-up Comment #4, bug #50075 (project lwip):
seg->oversize_left is set to 0 before adding seg to unacked list.
so
#if TCP_OVERSIZE_DBGCHECK
/* if last unsent changed, we need to update unsent_oversize */
if (pcb->unsent == NULL) {
pcb->unsent_oversize = seg->oversize_left;
}
#endif /* TCP_OVERSIZE_DBGCHECK */
is always equivalient to
#if TCP_OVERSIZE_DBGCHECK
/* if last unsent changed, we need to update unsent_oversize */
if (pcb->unsent == NULL) {
pcb->unsent_oversize = 0;
}
#endif /* TCP_OVERSIZE_DBGCHECK */
However, if pcb->unsent is NULL before adding unacked entries,
pcb->unsent_oversize should be 0. (otherwise, it's a bug).
So it's safe to do nothing here.
(Actually, I think reset pcb->unsent_oversize = 0 here might hide bug.
Note, I found the orignial code looks strange when *review* the code.
I'm checking some issue, but in the end my test shows it's nothing to do with
this part.
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?50075>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/