[Top][All Lists]

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

[lwip-devel] [bug #22530] api_msg.c's recv_raw() does not consume data

From: Jonathan Larmour
Subject: [lwip-devel] [bug #22530] api_msg.c's recv_raw() does not consume data
Date: Mon, 10 Mar 2008 13:17:14 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20070530 Fedora/ Firefox/


                 Summary: api_msg.c's recv_raw() does not consume data
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: jifl
            Submitted on: Monday 03/10/2008 at 13:17
                Category: None
                Severity: 3 - Normal
              Item Group: Faulty Behaviour
                  Status: Confirmed
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 



>From lwip-users:
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.


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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