lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] loopif bug ?


From: Kieran Mansley
Subject: Re: [lwip-users] loopif bug ?
Date: Thu, 27 Feb 2003 17:26:00 +0000 (GMT)

On Thu, 27 Feb 2003, Andreas Stenius wrote:

> Hi all,
>
> I've run across a misshap with the loopif ( TCP only, not UDP ).
> When connecting to 'localhost' using the loopif interface, the tcp packet is
> processed on the
> receiver side before the send process is completed, resulting in a reference
> to NULL in tcp_process:

Yep, looks like a bug to me.  Quite an interesting one in fact.
Demonstrates nicely that no one else is using the loopif interface.  In
theory I guess it could affect a non-loopback interface if the network
were fast enough.

I'd file a bug report on savannah if I were you, but it should be fairly
straightforward to fix.  Moving the portion of code in tcp_output that
updates pcb->unacked to before the call to tcp_output_segment should do
the trick.  Although interestingly if TCP_TCPLEN is never greater than 0,
pcb->unacked will remain NULL, and we'll still get a seg fault.  Is it
possible for this to happen? (admittedly it would be a pretty dull
connection, but if it's possible we should be able to cope with it).

Kieran








reply via email to

[Prev in Thread] Current Thread [Next in Thread]