lwip-users
[Top][All Lists]
Advanced

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

RE: [lwip-users] netif/etharp assertion failure


From: Goldschmidt Simon
Subject: RE: [lwip-users] netif/etharp assertion failure
Date: Sun, 1 Jul 2007 16:52:55 +0200

Fixed in CVS head.

-----Originalnachricht-----
Von: address@hidden
An: address@hidden
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
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users


reply via email to

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