Giovanni,
I noticed that in the bug tracking for this issue it was marked as resolved with a comment from you "Fixed by lwIP 2.0 merge" (https://sourceforge.net/p/chibios/bugs/729/), but your last comment on this thread was half a year later and seems to imply the issue may not have been resolved.
I wanted to see if this was successfully patched in one of the stable releases, as it may be causing a problem I'm having.
LwIP pbuf/memp corruption Topic is solved
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: LwIP pbuf/memp corruption
Hi,
On the tracker there is another issue not yet resolved: https://sourceforge.net/p/chibios/bugs/1009/
Could this be causing your problem? anyway, if you have a better understanding of the problem could you suggest a fix?
Giovanni
On the tracker there is another issue not yet resolved: https://sourceforge.net/p/chibios/bugs/1009/
Could this be causing your problem? anyway, if you have a better understanding of the problem could you suggest a fix?
Giovanni
Re: LwIP pbuf/memp corruption
Having re-read this thread, I would say that the originally reported problem has been fixed. The relevant bit of code is:
So buffer is allocated in low_level_input().
It's then either passed to thisif.input() (which presumably frees it after processing) or its released in the above loop.
I think I've now used lwip sufficiently that any problem would have shown by now.
Code: Select all
if (mask & FRAME_RECEIVED_ID) {
struct pbuf *p;
while (low_level_input(&thisif, &p)) {
if (p != NULL) {
struct eth_hdr *ethhdr = p->payload;
switch (htons(ethhdr->type)) {
/* IP or ARP packet? */
case ETHTYPE_IP:
case ETHTYPE_ARP:
/* full packet send to tcpip_thread to process */
if (thisif.input(p, &thisif) == ERR_OK)
break;
LWIP_DEBUGF(NETIF_DEBUG, ("ethernetif_input: IP input error\n"));
/* Falls through */
default:
pbuf_free(p);
}
}
}
}
So buffer is allocated in low_level_input().
It's then either passed to thisif.input() (which presumably frees it after processing) or its released in the above loop.
I think I've now used lwip sufficiently that any problem would have shown by now.
Who is online
Users browsing this forum: No registered users and 48 guests