|
From: | address@hidden |
Subject: | Re: [lwip-devel] Problem with LWIP_ERROR in pbuf_header(..) |
Date: | Mon, 27 Apr 2009 20:39:13 +0200 |
User-agent: | Thunderbird 2.0.0.21 (Macintosh/20090302) |
Simon address@hidden wrote:
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 _______________________________________________ lwip-devel mailing list address@hidden http://lists.nongnu.org/mailman/listinfo/lwip-devel
[Prev in Thread] | Current Thread | [Next in Thread] |