lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] recv_raw race condition?


From: Jonathan Larmour
Subject: Re: [lwip-users] recv_raw race condition?
Date: Mon, 10 Mar 2008 13:15:21 +0000
User-agent: Thunderbird 1.5.0.12 (X11/20070530)

Siva Velusamy wrote:
> Hello,
> 
> I have an application that opens up a raw socket (SOCK_RAW), and is
> expecting to receive an ICMP packet.
> 
> In this case, depending on the kernel scheduling, sometimes the packet
> received includes the IP header, and sometimes not. This occurs because
> recv_raw (api_msg.c) posts the received packet into the applications
> mbox. However, it does not say that the packet has been processed (or
> "eaten" according to the sorrounding comments), so further layers
> continue processing the packet. Eventually it reaches icmp_input which
> moves the payload past the ip header.
> 
> It seems like the code in recv_raw should return 1 in cases where there
> is an application waiting for the input. I can see that this is ok to do
> for ICMP packets, but I'm not sure if it is generally applicable.
> 
> The issue exists in lwip-1.2.0, and at first glance appears to exist in
> lwip-1.3.0rc1 also.

I agree that this does seem to be a bug. I am posting it to the bug
management system.

Jifl
-- 
eCosCentric Limited      http://www.eCosCentric.com/     The eCos experts
 **  Visit us at ESC Silicon Valley <http://www.embedded.com/esc/sv>  **
 **  April 15-17 2008, Booth 3012, San Jose McEnery Convention Center **
Barnwell House, Barnwell Drive, Cambridge, UK.       Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.
------["Si fractum non sit, noli id reficere"]------       Opinions==mine




reply via email to

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