lwip-devel
[Top][All Lists]
Advanced

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

Re: [lwip-devel] Problem with LWIP_ERROR in pbuf_header(..)


From: address@hidden
Subject: Re: [lwip-devel] Problem with LWIP_ERROR in pbuf_header(..)
Date: Mon, 27 Apr 2009 18:03:31 +0200
User-agent: Thunderbird 2.0.0.21 (Macintosh/20090302)

Fredrik Hederstierna wrote:
> In the case you mention, shouldn't the first clause in the if statement
> "if (p->tot_len < (IPH_HL(iphdr) * 4 + UDP_HLEN)"  protect us from the
> assertion?  I.e. if the packet is short it should do that clause, but
> then not the pbuf_header() call.

But is it true that always  (p->tot_len == p->len)  here ?
Maybe due to almost full memory  p->tot_len  is  larger than  p->len ?
The ERROR is checking  p->len,  but if-statement checks  p->tot_len.

I think you are right: if the first pbuf is smaller than the headers, the assert may fail. We should check p->len: the lwIP code definively can't cope with headers spreaded over multiple pbufs.

Simon




reply via email to

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