diff --git a/llarp/messages/relay_commit.cpp b/llarp/messages/relay_commit.cpp index 1de8ff417..1c744d60d 100644 --- a/llarp/messages/relay_commit.cpp +++ b/llarp/messages/relay_commit.cpp @@ -259,6 +259,9 @@ namespace llarp if(self->context->CheckPathLimitHitByIP(self->fromAddr)) { llarp::LogError("client path build limited ", self->hop->info); + OnForwardLRCMResult(self->context->Router(), self->hop->info.rxID, + self->hop->info.downstream, self->hop->pathKey, + SendStatus::Congestion); self->hop = nullptr; return; } diff --git a/llarp/path/path_context.cpp b/llarp/path/path_context.cpp index 3f032cd6d..249a58dc3 100644 --- a/llarp/path/path_context.cpp +++ b/llarp/path/path_context.cpp @@ -36,7 +36,10 @@ namespace llarp PathContext::CheckPathLimitHitByIP(const llarp::Addr& ip) { llarp::Addr remote = ip; + // set port to zero remote.port(0); + // try inserting remote address by ip into decaying hash set + // if it cannot insert it has hit a limit return not m_PathLimits.Insert(remote); }