mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-01 12:24:22 +00:00
Prevented a race condition between a new ARP request and the ARP timer.
Timeouts stay the same (halved the ARP timer, doubled the counts), but ETHARP_MAX_PENDING should be at least 2 to prevent it from reaching 0 right away, giving too little time for any ARP responses to be noted.
This commit is contained in:
parent
a5cd3fcafd
commit
ed59dc1ada
@ -107,7 +107,8 @@ PACK_STRUCT_END
|
|||||||
# include "arch/epstruct.h"
|
# include "arch/epstruct.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define ARP_TMR_INTERVAL 10000
|
/** 5 seconds period */
|
||||||
|
#define ARP_TMR_INTERVAL 5000
|
||||||
|
|
||||||
#define ETHTYPE_ARP 0x0806
|
#define ETHTYPE_ARP 0x0806
|
||||||
#define ETHTYPE_IP 0x0800
|
#define ETHTYPE_IP 0x0800
|
||||||
|
@ -55,10 +55,17 @@
|
|||||||
# include "lwip/dhcp.h"
|
# include "lwip/dhcp.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** the time an ARP entry stays valid after its last update, (120 * 10) seconds = 20 minutes. */
|
/** the time an ARP entry stays valid after its last update,
|
||||||
#define ARP_MAXAGE 120
|
* (240 * 5) seconds = 20 minutes.
|
||||||
/** the time an ARP entry stays pending after first request, (1 * 10) seconds = 10 seconds. */
|
*/
|
||||||
#define ARP_MAXPENDING 1
|
#define ARP_MAXAGE 240
|
||||||
|
/** the time an ARP entry stays pending after first request,
|
||||||
|
* (2 * 5) seconds = 10 seconds.
|
||||||
|
*
|
||||||
|
* @internal Keep this number at least 2, otherwise it might
|
||||||
|
* run out instantly if the timeout occurs directly after a request.
|
||||||
|
*/
|
||||||
|
#define ARP_MAXPENDING 2
|
||||||
|
|
||||||
#define HWTYPE_ETHERNET 1
|
#define HWTYPE_ETHERNET 1
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user