Skip to content

Commit

Permalink
walk back bans from routers that ignore our congestion caps
Browse files Browse the repository at this point in the history
  • Loading branch information
eyedeekay committed Jul 20, 2023
1 parent 97f8c6a commit 8376d2a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions router/java/src/net/i2p/router/tunnel/pool/BuildHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,11 @@ private long handleRequest(BuildMessageState state, long now) {
// congestion flags
if (fromVersion != null){
if (VersionComparator.comp(fromVersion, MIN_VERSION_HONOR_CAPS) >= 0) {
_context.statManager().addRateData("tunnel.dropTunnelFromVersion"+from, 1);
_context.statManager().addRateData("tunnel.dropTunnelFromCongestionCapability"+from, 1);
_context.statManager().addRateData("tunnel.dropTunnelFromCongestionCapability"+fromVersion, 1);
/*
TODO: Determine if it's at all reasonable to do something about routers that are forwarding tunnel
builds to us from other people who are spamming tunnel builds.
long knocks = _context.statManager().getRate("tunnel.dropTunnelFromVersion"+from).getLifetimeEventCount();
if (knocks > 10) {
if (_log.shouldLog(Log.WARN))
Expand All @@ -508,7 +512,7 @@ private long handleRequest(BuildMessageState state, long now) {
OutNetMessage outMsg = new OutNetMessage(_context, dsm, _context.clock().now() + TIMEOUT, PRIORITY, fromRI);
_context.outNetMessagePool().add(outMsg);
}

*/
}
}
}
Expand Down

0 comments on commit 8376d2a

Please sign in to comment.