etharp: reduce ARP aging timeout from 20 minutes to 5 minutes, since this is a time obviously used in some switches as MAC learning table timeout. Having our ARP timeout higher than this can lead to sending unicast packets to multiple network segments.

This commit is contained in:
sg 2015-03-24 20:04:18 +01:00
parent 210496f0ca
commit 86970a01d7

View File

@ -75,9 +75,10 @@ const struct eth_addr ethzero = {{0,0,0,0,0,0}};
/** the time an ARP entry stays valid after its last update,
* for ARP_TMR_INTERVAL = 1000, this is
* (60 * 20) seconds = 20 minutes.
* (60 * 5) seconds = 5 minutes.
*/
#define ARP_MAXAGE 1200
#define ARP_MAXAGE 300
/** 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. */
#define ARP_AGE_REREQUEST_USED_UNICAST (ARP_MAXAGE - 30)