etharp_entry::ctime must be u16_t after changing ARP_TMR_INTERVAL from 5 seconds to 1 second when fixing bug #34682

This commit is contained in:
Simon Goldschmidt 2014-02-26 21:51:56 +01:00
parent f36d6b7ef5
commit 8558fa0bcf

View File

@ -77,7 +77,7 @@ const struct eth_addr ethzero = {{0,0,0,0,0,0}};
* for ARP_TMR_INTERVAL = 1000, this is * for ARP_TMR_INTERVAL = 1000, this is
* (60 * 20) seconds = 20 minutes. * (60 * 20) seconds = 20 minutes.
*/ */
#define ARP_MAXAGE (60*20) #define ARP_MAXAGE 1200
/** Re-request a used ARP entry 1 minute before it would expire to prevent /** Re-request a used ARP entry 1 minute before it would expire to prevent
* breaking a steadily used connection because the ARP entry timed out. */ * breaking a steadily used connection because the ARP entry timed out. */
#define ARP_AGE_REREQUEST_USED (ARP_MAXAGE - 60) #define ARP_AGE_REREQUEST_USED (ARP_MAXAGE - 60)
@ -114,8 +114,8 @@ struct etharp_entry {
ip_addr_t ipaddr; ip_addr_t ipaddr;
struct netif *netif; struct netif *netif;
struct eth_addr ethaddr; struct eth_addr ethaddr;
u16_t ctime;
u8_t state; u8_t state;
u8_t ctime;
}; };
static struct etharp_entry arp_table[ARP_TABLE_SIZE]; static struct etharp_entry arp_table[ARP_TABLE_SIZE];