Fix BUG#11400 - don't corrupt existing pbuf chain when enqueuing multiple pbufs to a pending ARP request

This commit is contained in:
goldsimon
2007-03-04 12:12:42 +00:00
parent e1b6a4cb21
commit 1f544e087b
6 changed files with 93 additions and 28 deletions

View File

@@ -46,7 +46,9 @@ typedef enum {
MEMP_NETBUF,
MEMP_NETCONN,
MEMP_TCPIP_MSG,
#if ARP_QUEUEING
MEMP_ARP_QUEUE,
#endif
MEMP_SYS_TIMEOUT,
MEMP_MAX

View File

@@ -107,6 +107,12 @@ a lot of data that needs to be copied, this should be set high. */
#ifndef MEMP_NUM_TCP_SEG
#define MEMP_NUM_TCP_SEG 16
#endif
/* MEMP_NUM_ARP_QUEUE: the number of simulateously queued outgoing
packets (pbufs) that are waiting for an ARP request (to resolve
their destination address) to finish. */
#ifndef MEMP_NUM_ARP_QUEUE
#define MEMP_NUM_ARP_QUEUE 30
#endif
/* MEMP_NUM_SYS_TIMEOUT: the number of simulateously active
timeouts. */
#ifndef MEMP_NUM_SYS_TIMEOUT

View File

@@ -113,6 +113,15 @@ PACK_STRUCT_END
#define ETHTYPE_ARP 0x0806
#define ETHTYPE_IP 0x0800
#if ARP_QUEUEING
/** struct for queueing outgoing packets for unknown address
* defined here to be accessed by memp.h
*/
struct etharp_q_entry {
struct etharp_q_entry *next;
struct pbuf *p;
};
#endif
void etharp_init(void);
void etharp_tmr(void);