Fixed in CVS head. 

-----Originalnachricht-----
Von: [EMAIL PROTECTED]
An: [email protected]
Gesendet: 29.06.2007 15:15
Betreff: [lwip-users] netif/etharp assertion failure

Hi,

I am getting an assertion failure (after extended use) in etharp.c

LWIP assertion failure, file: netif/etharp.c, line: 886
no packet queues allowed!

Looking at the code:

      p = q;
      while (p) {
        LWIP_ASSERT("no packet queues allowed!", (p->len == p->tot_len) 
|| (p->next == 0));
        if(p->flags != PBUF_FLAG_ROM) {
          copy_needed = 1;
          break;
        }
        p = p->next;
      }
 
I think the intent is to ensure that only single packets are queued up 
on ARP entries, not queues of packets.

To me the code says that q must point to a pbuf that has just one 
element (p->len == p->tot_len case).  If there were two pbufs in a 
chain, the first pbuf would fail both conditions (p->len would 
presumably be less than p->tot_len and p->next wouldn't be NULL).

I think the code should have said:

      p = q;
      while (p) {
        LWIP_ASSERT("no packet queues allowed!", (p->tot_len == (p->len 
+ (p->next ? p->next->tot_len:0) );
        if(p->flags != PBUF_FLAG_ROM) {
          copy_needed = 1;
          break;
        }
        p = p->next;
      }

Or am I missing something?

Cheers,
Robin



_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users
_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to