[Top][All Lists]

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

[lwip-devel] [bug #30625] netif/etharp assertion failure

From: Charles Landau
Subject: [lwip-devel] [bug #30625] netif/etharp assertion failure
Date: Mon, 02 Aug 2010 04:32:12 +0000
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv: Gecko/20100722 Firefox/3.6.8


                 Summary: netif/etharp assertion failure
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: clandau
            Submitted on: Mon 02 Aug 2010 04:32:11 AM GMT
                Category: ARP
                Severity: 3 - Normal
              Item Group: Crash Error
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 
            lwIP version: Other



lwIP crashed in etharp_query with the message "no packet queues allowed!". I
didn't find any reference to this in the lwip-devel mailing list or existing
bugs here, but I did find this email thread on the web:
which documents how the code came to be what it is:

LWIP_ASSERT("no packet queues allowed!", (p->len != p->tot_len) || (p->next
== 0)); 

Unfortunately that is the wrong fix. It fails when I send a zero-length UDP
packet to a destination that is not already in the ARP cache. A header gets
chained in front of the packet in udp_sendto_if, so when it reaches the
assertion in etharp_query, p points to the pbuf containing the header and
p->next points to the pbuf containing the original (zero length) payload. The
assertion fails. 

The correct test is:

(p->next == NULL) || (p->tot_len == p->len + p->next->tot_len)

This is in lwIP version 1.3.2 (which, by the way, isn't an option under "lwIP
version" when submitting a bug). 

(I'm using the TIME protocol in RFC868, in which a request is any UDP packet
including a zero-length packet.)


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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