Skip to content

Commit d5af41d

Browse files
author
eyedeekay
committed
Router: Disable updating the PeerManager when we recieve a router down a client tunnel
1 parent e49c18a commit d5af41d

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

router/java/src/net/i2p/router/tunnel/InboundMessageDistributor.java

+3-9
Original file line numberDiff line numberDiff line change
@@ -130,15 +130,9 @@ public void distribute(I2NPMessage msg, Hash target, TunnelId tunnel) {
130130
return;
131131
if (!ri.isValid())
132132
return;
133-
RouterInfo oldri = _context.netDb().lookupRouterInfoLocally(key);
134-
// only update if RI is newer and non-ff
135-
if (oldri != null && oldri.getPublished() < ri.getPublished() &&
136-
!FloodfillNetworkDatabaseFacade.isFloodfill(ri)) {
137-
if (_log.shouldLog(Log.WARN))
138-
_log.warn("Updating caps for RI " + key + " from \"" +
139-
oldri.getCapabilities() + "\" to \"" + ri.getCapabilities() + '"');
140-
_context.peerManager().setCapabilities(key, ri.getCapabilities());
141-
}
133+
// RouterInfo oldri = _context.netDb().lookupRouterInfoLocally(key);
134+
// don't update caps if the RouterInfo came down a client tunnel, as it may be(Almost certainly is) malicious
135+
// and we deny RI storage in client DB's anyway
142136
return;
143137
} else if (dsm.getReplyToken() != 0) {
144138
_context.statManager().addRateData("tunnel.dropDangerousClientTunnelMessage", 1, type);

0 commit comments

Comments
 (0)