mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-01-01 12:00:53 +00:00
Fixed bug: assert fired when MEMP_ARP_QUEUE was empty (which can happen any time). Now the packet simply isn't enqueued when out of memory.
This commit is contained in:
parent
bfe24b138d
commit
21bbc9a81a
@ -460,6 +460,10 @@ HISTORY
|
|||||||
|
|
||||||
++ Bug fixes:
|
++ Bug fixes:
|
||||||
|
|
||||||
|
2007-11-10 Simon Goldschmidt
|
||||||
|
* etharp.c: Fixed bug: assert fired when MEMP_ARP_QUEUE was empty (which can
|
||||||
|
happen any time). Now the packet simply isn't enqueued when out of memory.
|
||||||
|
|
||||||
2007-11-01 Simon Goldschmidt
|
2007-11-01 Simon Goldschmidt
|
||||||
* tcp.c, tcp_in.c: Fixed bug #21494: The send mss (pcb->mss) is set to 536 (or
|
* tcp.c, tcp_in.c: Fixed bug #21494: The send mss (pcb->mss) is set to 536 (or
|
||||||
TCP_MSS if that is smaller) as long as no MSS option is received from the
|
TCP_MSS if that is smaller) as long as no MSS option is received from the
|
||||||
|
@ -945,7 +945,7 @@ etharp_query(struct netif *netif, struct ip_addr *ipaddr, struct pbuf *q)
|
|||||||
struct etharp_q_entry *new_entry;
|
struct etharp_q_entry *new_entry;
|
||||||
/* allocate a new arp queue entry */
|
/* allocate a new arp queue entry */
|
||||||
new_entry = memp_malloc(MEMP_ARP_QUEUE);
|
new_entry = memp_malloc(MEMP_ARP_QUEUE);
|
||||||
LWIP_ASSERT("newEntry != NULL", new_entry != NULL);
|
if (new_entry != NULL) {
|
||||||
new_entry->next = 0;
|
new_entry->next = 0;
|
||||||
new_entry->p = p;
|
new_entry->p = p;
|
||||||
if(arp_table[i].q != NULL) {
|
if(arp_table[i].q != NULL) {
|
||||||
@ -962,6 +962,12 @@ etharp_query(struct netif *netif, struct ip_addr *ipaddr, struct pbuf *q)
|
|||||||
}
|
}
|
||||||
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: queued packet %p on ARP entry %"S16_F"\n", (void *)q, (s16_t)i));
|
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: queued packet %p on ARP entry %"S16_F"\n", (void *)q, (s16_t)i));
|
||||||
result = ERR_OK;
|
result = ERR_OK;
|
||||||
|
} else {
|
||||||
|
/* the pool MEMP_ARP_QUEUE is empty */
|
||||||
|
pbuf_free(p);
|
||||||
|
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: could not queue a copy of PBUF_REF packet %p (out of memory)\n", (void *)q));
|
||||||
|
/* { result == ERR_MEM } through initialization */
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: could not queue a copy of PBUF_REF packet %p (out of memory)\n", (void *)q));
|
LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: could not queue a copy of PBUF_REF packet %p (out of memory)\n", (void *)q));
|
||||||
/* { result == ERR_MEM } through initialization */
|
/* { result == ERR_MEM } through initialization */
|
||||||
|
Loading…
Reference in New Issue
Block a user