I2CP: Prevent loopback messages to same session (i2pd Github #2005)

This commit is contained in:
zzz committed 2024-01-15 10:35:29 +00:00
1 parent ba39f58800
commit f337c1b3c9
7 files changed
+34 -31

No files matched your search

@@ -157,6 +157,7 @@ class MessageState {
case MessageStatusMessage.STATUS_SEND_FAILURE_EXPIRED_LEASESET:
case MessageStatusMessage.STATUS_SEND_FAILURE_NO_LEASESET:
case MessageStatusMessage.STATUS_SEND_FAILURE_META_LEASESET:
case MessageStatusMessage.STATUS_SEND_FAILURE_LOOPBACK:
case SendMessageStatusListener.STATUS_CANCELLED:
// does not trump success
if (_state != State.SUCCESS)
@@ -189,6 +189,13 @@ public class MessageStatusMessage extends I2CPMessageImpl {
*/
public final static int STATUS_SEND_FAILURE_META_LEASESET = 22;
/**
* Message was attempted to be sent to the same Destination.
* This is a guaranteed failure.
* @since 0.9.62
*/
public final static int STATUS_SEND_FAILURE_LOOPBACK = 23;
// NOTE:
// Add any new status codes to handlers in:
// net.i2p.client.impl.MessageState