Skip to content

Commit

Permalink
Router: revert changes to OutboundTunnelEndpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
eyedeekay committed Feb 27, 2024
1 parent d3cf350 commit 2af3025
Showing 1 changed file with 0 additions and 39 deletions.
39 changes: 0 additions & 39 deletions router/java/src/net/i2p/router/tunnel/OutboundTunnelEndpoint.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import net.i2p.data.Hash;
import net.i2p.data.TunnelId;
import net.i2p.data.i2np.DatabaseStoreMessage;
import net.i2p.data.i2np.I2NPMessage;
import net.i2p.data.i2np.TunnelDataMessage;
import net.i2p.router.OutNetMessage;
Expand All @@ -21,7 +20,6 @@ class OutboundTunnelEndpoint {
private final HopProcessor _processor;
private final FragmentHandler _handler;
private final OutboundMessageDistributor _outDistributor;
private int _lsdsm, _ridsm, _i2npmsg, _totalmsg;

public OutboundTunnelEndpoint(RouterContext ctx, HopConfig config, HopProcessor processor) {
_context = ctx;
Expand All @@ -30,7 +28,6 @@ public OutboundTunnelEndpoint(RouterContext ctx, HopConfig config, HopProcessor
_processor = processor;
_handler = new RouterFragmentHandler(ctx, new DefragmentedHandler());
_outDistributor = new OutboundMessageDistributor(ctx, OutNetMessage.PRIORITY_PARTICIPATING);
_totalmsg = _lsdsm = _ridsm = _i2npmsg = 0;
}

public void dispatch(TunnelDataMessage msg, Hash recvFrom) {
Expand Down Expand Up @@ -59,7 +56,6 @@ public void dispatch(TunnelDataMessage msg, Hash recvFrom) {

private class DefragmentedHandler implements FragmentHandler.DefragmentedReceiver {
public void receiveComplete(I2NPMessage msg, Hash toRouter, TunnelId toTunnel) {
_totalmsg++;
if (toRouter == null) {
// Delivery type LOCAL is not supported at the OBEP
// We don't have any use for it yet.
Expand All @@ -73,41 +69,6 @@ public void receiveComplete(I2NPMessage msg, Hash toRouter, TunnelId toTunnel) {
+ " to be forwarded on to "
+ toRouter.toBase64().substring(0,4)
+ (toTunnel != null ? ":" + toTunnel.getTunnelId() : ""));
if (toTunnel == null) {
int msgtype = msg.getType();
if (msgtype == DatabaseStoreMessage.MESSAGE_TYPE) {
DatabaseStoreMessage dsm = (DatabaseStoreMessage)msg;
if (!dsm.getEntry().isLeaseSet()) {
_ridsm++;
_context.statManager().addRateData("tunnel.outboundTunnelEndpointFwdRIDSM", 1);
if (_log.shouldLog(Log.WARN))
_log.warn("OBEP directly forwarding RI DSM (count: "
+ _ridsm + "/" + _totalmsg + ") from tunnel id "
+ _config.getReceiveTunnelId()
+ " to router "
+ toRouter.toBase64().substring(0,4)
+ " with message: " + dsm);
} else {
_lsdsm++;
if (_log.shouldLog(Log.INFO))
_log.info("OBEP directly forwarding LS DSM (count: "
+ _lsdsm + "/" + _totalmsg + ") from tunnel id "
+ _config.getReceiveTunnelId()
+ " to router "
+ toRouter.toBase64().substring(0,4)
+ " with message: " + dsm);
}
} else {
_i2npmsg++;
if (_log.shouldLog(Log.INFO))
_log.info("OBEP directly forwarding I2NP Message (count: "
+ _i2npmsg + "/" + _totalmsg + ") from tunnel id "
+ _config.getReceiveTunnelId()
+ " to router "
+ toRouter.toBase64().substring(0,4)
+ " with message: " + msg);
}
}
int size = msg.getMessageSize();
// don't drop it if we are the target
boolean toUs = _context.routerHash().equals(toRouter);
Expand Down

0 comments on commit 2af3025

Please sign in to comment.