From da8901d40d18cc19f10c5562ee75f0c6dcbcf47c Mon Sep 17 00:00:00 2001 From: orignal Date: Thu, 18 Dec 2025 16:22:35 -0500 Subject: [PATCH] set number of generated tags to 800 for datagram destination if not specfied --- libi2pd/Destination.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libi2pd/Destination.cpp b/libi2pd/Destination.cpp index 00b9d734..93995d83 100644 --- a/libi2pd/Destination.cpp +++ b/libi2pd/Destination.cpp @@ -55,7 +55,11 @@ namespace client LogPrint (eLogInfo, "Destination: Parameters for tunnel set to: ", inQty, " inbound (", inLen, " hops), ", outQty, " outbound (", outLen, " hops), ", numTags, " tags"); int ratchetsInboundTags = 0; if (params->Get (I2CP_PARAM_RATCHET_INBOUND_TAGS, ratchetsInboundTags)) + { + if (ratchetsInboundTags && ratchetsInboundTags < i2p::garlic::ECIESX25519_MIN_NUM_GENERATED_TAGS) + ratchetsInboundTags = i2p::garlic::ECIESX25519_MIN_NUM_GENERATED_TAGS; SetNumRatchetInboundTags (ratchetsInboundTags); + } auto explicitPeersStr = (*params)[I2CP_PARAM_EXPLICIT_PEERS]; if (!explicitPeersStr.empty ()) { @@ -1358,7 +1362,11 @@ namespace client i2p::datagram::DatagramVersion version) { if (!m_DatagramDestination) + { + if (!GetNumRatchetInboundTags ()) + SetNumRatchetInboundTags (i2p::garlic::ECIESX25519_MAX_NUM_GENERATED_TAGS); // set max tags if not specified m_DatagramDestination = new i2p::datagram::DatagramDestination (GetSharedFromThis (), gzip, version); + } return m_DatagramDestination; }