forked from I2P_Developers/i2p.i2p
I2CP: Prevent sending message to a local meta destination
This commit is contained in:
@ -445,6 +445,15 @@ class ClientManager {
|
|||||||
Job j = new DistributeLocal(toDest, runner, sender, fromDest, payload, msgId, messageNonce);
|
Job j = new DistributeLocal(toDest, runner, sender, fromDest, payload, msgId, messageNonce);
|
||||||
//_ctx.jobQueue().addJob(j);
|
//_ctx.jobQueue().addJob(j);
|
||||||
j.runJob();
|
j.runJob();
|
||||||
|
} else if (!_metaDests.isEmpty() && _metaDests.contains(toDest)) {
|
||||||
|
// meta dests don't have runners but are local, and you can't send to them
|
||||||
|
ClientConnectionRunner sender = getRunner(fromDest);
|
||||||
|
if (sender == null) {
|
||||||
|
// sender went away
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
int rc = MessageStatusMessage.STATUS_SEND_FAILURE_BAD_LEASESET;
|
||||||
|
sender.updateMessageDeliveryStatus(fromDest, msgId, messageNonce, rc);
|
||||||
} else {
|
} else {
|
||||||
// remote. w00t
|
// remote. w00t
|
||||||
if (_log.shouldLog(Log.DEBUG))
|
if (_log.shouldLog(Log.DEBUG))
|
||||||
@ -764,7 +773,7 @@ class ClientManager {
|
|||||||
if (_log.shouldLog(Log.WARN))
|
if (_log.shouldLog(Log.WARN))
|
||||||
_log.warn("Message received but we don't have a connection to "
|
_log.warn("Message received but we don't have a connection to "
|
||||||
+ dest + "/" + _msg.getDestinationHash()
|
+ dest + "/" + _msg.getDestinationHash()
|
||||||
+ " currently. DROPPED");
|
+ " currently. DROPPED", new Exception());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user