Added assertions where PBUF_RAM pbufs are used and an assumption is made that this pbuf is in one piece (i.e. not chained). These assumptions clash with the possibility of converting to fully pool-based pbuf implementations, where PBUF_RAM pbufs might be chained.

This commit is contained in:
goldsimon
2007-07-03 20:28:35 +00:00
parent 2a77b9fcc7
commit eb875de67e
13 changed files with 86 additions and 15 deletions

View File

@@ -1028,6 +1028,8 @@ etharp_raw(struct netif *netif, const struct eth_addr *ethsrc_addr,
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE | 2, ("etharp_raw: could not allocate pbuf for ARP request.\n"));
return ERR_MEM;
}
LWIP_ASSERT("check that first pbuf can hold struct etharp_hdr",
(p->len >= sizeof(struct etharp_hdr)));
hdr = p->payload;
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_raw: sending raw ARP packet.\n"));