From fe66493fd7709eec032335032a012c03e15124bd Mon Sep 17 00:00:00 2001 From: 20kdc Date: Wed, 16 Aug 2017 23:29:40 +0100 Subject: [PATCH] Remove weird random component from LKR cache tuning It appears that (relib total attempt timer) / 2 is the best choice, since it leaves ample time to adapt to new routing graphs. --- culib.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/culib.lua b/culib.lua index 13d8e16..c707405 100644 --- a/culib.lua +++ b/culib.lua @@ -47,8 +47,8 @@ return function (hostname, transmit, onReceive, time) -- Expect another packet after this amount of time, -- or else clear the known receivers cache entry. -- Minimum should be less or equal to tuningAttempts * - -- tuningAttemptTime in relib. - local tuningExpectContinue = 15 + math.random(15) + -- tuningAttemptTime in relib. (Actually should be that /2 optimally. Adjusted accordingly.) + local tuningExpectContinue = 15 -- Flush the loop detector every so often. -- This is not a complete clear.