mirror of
https://github.com/i2p/i2p.i2p.git
synced 2026-10-23 19:32:56 +00:00
Router: More robustness fixes, bump -11-rc
- Debian: Remove resolute jars from jammy source - SSU2: Increase IP table size
This commit is contained in:
7 files changed
+45
-2
No files matched your search
@@ -20,7 +20,7 @@ public class RouterVersion {
|
||||
public final static String VERSION = CoreVersion.VERSION;
|
||||
/** for example: "beta", "alpha", "rc" */
|
||||
public final static String QUALIFIER = "-rc";
|
||||
public final static long BUILD = 10;
|
||||
public final static long BUILD = 11;
|
||||
/** for example "-test" */
|
||||
public final static String EXTRA = "";
|
||||
public final static String FULL_VERSION = VERSION + "-" + BUILD + QUALIFIER + EXTRA;
|
||||
|
||||
+5
@@ -256,6 +256,7 @@ class HandleFloodfillDatabaseStoreMessageJob extends JobImpl {
|
||||
if (count > LIMIT_ROUTERS) {
|
||||
String caps = ri.getCapabilities();
|
||||
boolean isU = caps.indexOf(Router.CAPABILITY_UNREACHABLE) >= 0;
|
||||
boolean isG = caps.indexOf(Router.CAPABILITY_NO_TUNNELS) >= 0;
|
||||
boolean isFF = caps.indexOf(FloodfillNetworkDatabaseFacade.CAPABILITY_FLOODFILL) >= 0;
|
||||
boolean notFrom = !key.equals(_fromHash);
|
||||
boolean isSlow = caps.indexOf(Router.CAPABILITY_BW32) >= 0;
|
||||
@@ -277,6 +278,8 @@ class HandleFloodfillDatabaseStoreMessageJob extends JobImpl {
|
||||
int pdrop = Math.min(110, (128 * count / LIMIT_ROUTERS) - 128);
|
||||
if (isU)
|
||||
pdrop *= 3;
|
||||
if (isG)
|
||||
pdrop *= 3;
|
||||
if (isFF)
|
||||
pdrop *= 3;
|
||||
if (notFrom)
|
||||
@@ -333,6 +336,8 @@ class HandleFloodfillDatabaseStoreMessageJob extends JobImpl {
|
||||
int pdrop = (128 * count / LIMIT_ROUTERS) - 128;
|
||||
if (isU)
|
||||
pdrop *= 3;
|
||||
if (isG)
|
||||
pdrop *= 3;
|
||||
if (isFF)
|
||||
pdrop *= 3;
|
||||
if (notFrom)
|
||||
|
||||
@@ -715,6 +715,17 @@ class InboundEstablishState extends EstablishBase implements NTCP2Payload.Payloa
|
||||
throw new DataFormatException("Old and slow: " + h);
|
||||
}
|
||||
|
||||
if (ri.getCapabilities().indexOf('G') >= 0 &&
|
||||
ri.getCapabilities().indexOf('X') >= 0 &&
|
||||
ri.getCapabilities().indexOf('f') >= 0 &&
|
||||
ri.getVersion().equals("0.9.67")) {
|
||||
long time = _context.netDb().floodfillEnabled() ? 30*60*1000 : 60*60*1000;
|
||||
_context.banlist().banlistRouter(h, "Refuses tunnels", null,
|
||||
null, _context.clock().now() + time);
|
||||
_msg3p2FailReason = NTCPConnection.REASON_BANNED;
|
||||
throw new DataFormatException("Refuses tunnels: " + h);
|
||||
}
|
||||
|
||||
try {
|
||||
RouterInfo old = _context.netDb().store(h, ri);
|
||||
if (flood && !ri.equals(old)) {
|
||||
|
||||
@@ -189,7 +189,7 @@ class EstablishmentManager {
|
||||
_liveIntroductions = new ConcurrentHashMap<Long, OutboundEstablishState>();
|
||||
_outboundByClaimedAddress = new ConcurrentHashMap<RemoteHostId, OutboundEstablishState>();
|
||||
_outboundByHash = new ConcurrentHashMap<Hash, OutboundEstablishState>();
|
||||
_inboundBans = new LHMCache<RemoteHostId, Long>(32);
|
||||
_inboundBans = new LHMCache<RemoteHostId, Long>(128);
|
||||
// roughly scale based on expected traffic
|
||||
int tokenCacheSize = Math.max(MIN_TOKENS, Math.min(MAX_TOKENS, 3 * _transport.getMaxConnections() / 4));
|
||||
_inboundTokens = new InboundTokens(tokenCacheSize);
|
||||
|
||||
@@ -374,6 +374,18 @@ class InboundEstablishState2 extends InboundEstablishState implements SSU2Payloa
|
||||
throw new RIException("Old and slow: " + h, REASON_BANNED);
|
||||
}
|
||||
|
||||
if (ri.getCapabilities().indexOf('G') >= 0 &&
|
||||
ri.getCapabilities().indexOf('X') >= 0 &&
|
||||
ri.getCapabilities().indexOf('f') >= 0 &&
|
||||
ri.getVersion().equals("0.9.67")) {
|
||||
long time = _context.netDb().floodfillEnabled() ? 30*60*1000 : 60*60*1000;
|
||||
_context.banlist().banlistRouter(h, "Refuses tunnels", null,
|
||||
null, _context.clock().now() + time);
|
||||
if (ri.verifySignature())
|
||||
_context.blocklist().add(_aliceIP);
|
||||
throw new RIException("Refuses tunnels: " + h, REASON_BANNED);
|
||||
}
|
||||
|
||||
String smtu = ra.getOption(UDPAddress.PROP_MTU);
|
||||
int mtu = 0;
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user