From 86970a01d7e1f7dcb4c74b366b0254eba01a3615 Mon Sep 17 00:00:00 2001 From: sg Date: Tue, 24 Mar 2015 20:04:18 +0100 Subject: [PATCH] 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. --- src/netif/etharp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/netif/etharp.c b/src/netif/etharp.c index 1adb7a4e..4e853ae8 100644 --- a/src/netif/etharp.c +++ b/src/netif/etharp.c @@ -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)