Skip to content

Commit

Permalink
Merge commit 'd36fc4db9214a947fdd63c47970b42d56232e9d6' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
maksis committed May 24, 2023
2 parents 397048b + d36fc4d commit aa1ddbe
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions airdcpp-core/airdcpp/ConnectionManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ void TokenManager::removeToken(const string& aToken) noexcept {
#endif
}

#define CONNECT_FLOOD_COUNT_NORMAL 15
#define CONNECT_FLOOD_COUNT_NORMAL_MINOR 30
#define CONNECT_FLOOD_COUNT_NORMAL_SEVERE 45
#define CONNECT_FLOOD_COUNT_MCN 100
#define CONNECT_FLOOD_PERIOD 30

Expand Down Expand Up @@ -526,8 +527,8 @@ FloodCounter::FloodLimits ConnectionManager::getIncomingConnectionLimits(const s
}

return {
CONNECT_FLOOD_COUNT_NORMAL,
CONNECT_FLOOD_COUNT_NORMAL,
CONNECT_FLOOD_COUNT_NORMAL_MINOR,
CONNECT_FLOOD_COUNT_NORMAL_SEVERE,
};
}

Expand All @@ -548,7 +549,7 @@ void ConnectionManager::accept(const Socket& sock, bool aSecure) noexcept {
return true;
}

if (floodResult.hitLimit) {
if (floodResult.type == FloodCounter::FloodType::FLOOD_SEVERE && floodResult.hitLimit) {
LogManager::getInstance()->message(STRING_F(INCOMING_CONNECT_FLOOD_FROM, aIP), LogMessage::SEV_WARNING, STRING(CONNECTIVITY));
}

Expand Down

0 comments on commit aa1ddbe

Please sign in to comment.