Remove redundant "if" statement, and use real rcv_wnd

rather than rcv_ann_wnd when deciding if packets are in-window.
Contributed by <arasmussen@consultant.datasys.swri.edu>
This commit is contained in:
kieranm 2008-05-30 12:21:29 +00:00
parent 7bc881ccc5
commit 24e0b25215
2 changed files with 7 additions and 6 deletions

View File

@ -21,6 +21,10 @@ HISTORY
++ Bugfixes:
2008-05-30 Kieran Mansley
* tcp_in.c Remove redundant "if" statement, and use real rcv_wnd
rather than rcv_ann_wnd when deciding if packets are in-window.
Contributed by <arasmussen@consultant.datasys.swri.edu>
2008-05-30 Kieran Mansley
* mem.h: Fix BUG#23254. Change macro definition of mem_* to allow

View File

@ -511,7 +511,7 @@ tcp_process(struct tcp_pcb *pcb)
}
} else {
if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt,
pcb->rcv_nxt+pcb->rcv_ann_wnd)) {
pcb->rcv_nxt+pcb->rcv_wnd)) {
acceptable = 1;
}
}
@ -1038,7 +1038,7 @@ tcp_receive(struct tcp_pcb *pcb)
and below rcv_nxt + rcv_wnd) in order to be further
processed. */
if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt,
pcb->rcv_nxt + pcb->rcv_ann_wnd - 1)){
pcb->rcv_nxt + pcb->rcv_wnd - 1)){
if (pcb->rcv_nxt == seqno) {
accepted_inseq = 1;
/* The incoming segment is the next in sequence. We check if
@ -1282,10 +1282,7 @@ tcp_receive(struct tcp_pcb *pcb)
}
} else {
if(!TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt,
pcb->rcv_nxt + pcb->rcv_ann_wnd-1)){
tcp_ack_now(pcb);
}
tcp_ack_now(pcb);
}
} else {
/* Segments with length 0 is taken care of here. Segments that