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) {