buglwIP - A Lightweight TCP/IP stack - Bugs: bug #10548, Problem w/ TCP_SEQ_BETWEEN at ONE...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #10548: Problem w/ TCP_SEQ_BETWEEN at ONE place in tcp_in.c

Submitted by:  None
Submitted on:  Fri 01 Oct 2004 02:11:49 PM UTC  
 
Category: TCPSeverity: 3 - Normal
Item Group: Faulty BehaviourStatus: Fixed
Privacy: PublicAssigned to: Leon Woestenberg <leonwoestenberg>
Open/Closed: ClosedPlanned Release: None
lwIP version: None

Sun 26 Dec 2004 01:46:49 PM UTC, comment #3:

I am closing this bug now the published workaround both works, is implemented in lwIP, and documented as such in the code.

Leon Woestenberg <likewise>
Project Member
Sat 16 Oct 2004 01:09:05 PM UTC, comment #2:

I think Leon has now checked in a fix to this bug.

Kieran Mansley <kieranm>
Project Administrator
Sun 03 Oct 2004 02:37:02 PM UTC, comment #1:

The call to the macro TCP_SEQ_BETWEEN(a,b,c) causes (b) to
be evaluated twice on LITTLE_ENDIAN machines because of the
call to ntohl(). This produces more code (at least on the ARM). As a current work around, I have left all of the code in tcp_in.c untouched and changed the TCP_SEQ_BETWEEN() macro in tcp.h to
(TCP_SEQ_GEQ(a,b) && TCP_SEQ_LEQ(a,c))
This both works and produces less code.
-unavailable-

Anonymous
Fri 01 Oct 2004 02:11:49 PM UTC, original submission:

I just finished a port from lwIP-0.7.2 to the current code in CVS. The processor is an LPC2292 with a CS8900 ethernet chip. The LPC is an ARM7TDMI which operates in LITTLE_ENDIAN mode. The problem shows up for me when using Adam's minimal http server. I have isolated it to the TCP_SEQ_BETWEEN in tcp_in.c at line 822. When I use the
previous macros, the code serves pages just fine. When I use the new macro, it does not. The code fragment that works is:

while (pcb->unsent != NULL &&
TCP_SEQ_LEQ(ntohl(pcb->unsent->tcphdr->seqno) +
TCP_TCPLEN(pcb->unsent), ackno) &&
TCP_SEQ_LEQ(ackno, pcb->snd_max)
/*TCP_SEQ_BETWEEN(ackno,
ntohl(pcb->unsent->tcphdr->seqno) +
TCP_TCPLEN(pcb->unsent), pcb->snd_max)*/

So far I have been unable to determine why in this instance the macro does not work. Maybe something to do with LITTLE_ENDIAN. Maybe another set of eyes can spot it.

Anonymous

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 3 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Sun 26 Dec 2004 01:46:49 PM UTClikewiseOpen/ClosedOpen=>Closed
Sat 16 Oct 2004 01:09:05 PM UTCkieranmStatusNone=>Fixed
  Assigned toNone=>leonwoestenberg

Back to the top


Powered by Savane 3.1-cleanup1