Re: [lwip-devel] Problem with LWIP_ERROR in pbuf_header(..)
From:
Fredrik Hederstierna
Subject:
Re: [lwip-devel] Problem with LWIP_ERROR in pbuf_header(..)
Date:
Tue, 28 Apr 2009 08:45:33 +0200
> > That is if incomming UDP packet is too short,
so the call to
> > pbuf_header() will trig LWIP_ERROR?
> > Isn't it better to just drop illegal-size packets instead of
ASSERT?
> > What if header and header length is corrupted?
>
> 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.
>
> Also, it's a good idea subscribe to lwip-devel to make sure you see
> replies to your questions. I've CC'd you as I noticed in this
case that
> you're not subscribed, but I don't always realise!
About configure lwIP correct:
How can we protect us from incoming packets with malformed
headers or too large headers?
Should we use larger PBUF_POOL_SIZE ? But how
can we be sure that it will work for all types of connections? Should we use larger HEAP size? Or if we get unexpected or malformed headers/packets?