lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #27576] pbuf_realloc will assert or crash on a non-cha


From: Bill Auerbach
Subject: [lwip-devel] [bug #27576] pbuf_realloc will assert or crash on a non-chained pbuf list
Date: Fri, 02 Oct 2009 14:00:11 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729)

Follow-up Comment #6, bug #27576 (project lwip):

You're right!!!  I update len with the incoming packet, but not tot_len.

The root of the misunderstanding is the ethernetif template shows how to
receive a packet when the length is known, but not when it's not.  Only when
the DMA interrupt comes in do I know the packet size, then I have to fix the
packet lengths in the packet that just received the incoming packet.  I wasn't
setting tot_len.

Obviously doing this accesses the pbuf members directly (which is frowned
upon).  When I get the interrupt, is the better thing to do is to allocate a
PBUF_REF of the now known length and set the payload to the received data? 
(This mean we access payload member directly too).  Or do drivers get a pass
on member access?

What I wonder is why didn't I see this sooner?  I have 3 products (1
shipping) where I've done this and until this week didn't see the assertion.

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?27576>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/





reply via email to

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