From 2003b340364443296c9a5d0463b089577d84aee7 Mon Sep 17 00:00:00 2001 From: orignal Date: Mon, 15 Feb 2016 21:40:49 -0500 Subject: [PATCH] 12 hours expiration if more than 2500 routers --- NetDb.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/NetDb.cpp b/NetDb.cpp index 6376f44e..9f0e4312 100644 --- a/NetDb.cpp +++ b/NetDb.cpp @@ -375,6 +375,14 @@ namespace data total--; } } + else if (total > 2500) + { + if (ts > it.second->GetTimestamp () + 12*3600*1000LL) // 12 hours + { + it.second->SetUnreachable (true); + total--; + } + } else if (total > 300) { if (ts > it.second->GetTimestamp () + 30*3600*1000LL) // 30 hours