From 3b3d5e62616d856364b259680cabb3e1c406c273 Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Thu, 18 Dec 2014 18:21:31 +0000 Subject: [PATCH] document mac_cache max age constraint --- router/router.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/router/router.go b/router/router.go index cb97d095..7ca8a306 100644 --- a/router/router.go +++ b/router/router.go @@ -12,7 +12,10 @@ import ( "time" ) -const macMaxAge = 10 * time.Minute +const macMaxAge = 10 * time.Minute // [1] + +// [1] should be greater than typical ARP cache expiries, i.e. > 3/2 * +// /proc/sys/net/ipv4_neigh/*/base_reachable_time_ms on Linux func NewRouter(iface *net.Interface, name PeerName, password []byte, connLimit int, bufSz int, logFrame func(string, []byte, *layers.Ethernet)) *Router { onMacExpiry := func(mac net.HardwareAddr, peer *Peer) {