document mac_cache max age constraint

This commit is contained in:
Matthias Radestock committed 2014-12-18 18:21:31 +00:00
1 parent 1b140e3aa9
commit 3b3d5e6261
1 file changed
+4 -1
+4 -1
View File
@@ -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) {