From 974846bc98c15e3db92152fe845d485ad2add20b Mon Sep 17 00:00:00 2001 From: orignal Date: Sun, 25 Jan 2026 09:18:04 -0500 Subject: [PATCH] allow next hop from the same subnet if reservedrange=false --- libi2pd/NetDb.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libi2pd/NetDb.cpp b/libi2pd/NetDb.cpp index 16657b24..a3a496e5 100644 --- a/libi2pd/NetDb.cpp +++ b/libi2pd/NetDb.cpp @@ -1163,7 +1163,7 @@ namespace data (reverse ? (compatibleWith->IsReachableFrom (*router) && router->GetCompatibleTransports (true)): router->IsReachableFrom (*compatibleWith)) && !router->IsNAT2NATOnly (*compatibleWith) && router->IsECIES () && !router->IsHighCongestion (clientTunnel) && - !router->IsSameSubnet (*compatibleWith) && + (!i2p::transport::transports.IsCheckReserved () || !router->IsSameSubnet (*compatibleWith)) && (!checkIsReal || router->GetProfile ()->IsReal ()) && (!endpoint || (router->IsV4 () && (!reverse || router->IsPublished (true)))); // endpoint must be ipv4 and published if inbound(reverse) }); @@ -1203,7 +1203,7 @@ namespace data (router->GetCaps () & RouterInfo::eHighBandwidth) && router->GetVersion () >= NETDB_MIN_HIGHBANDWIDTH_VERSION && router->IsECIES () && !router->IsHighCongestion (true) && - !router->IsSameSubnet (*compatibleWith) && + (!i2p::transport::transports.IsCheckReserved () || !router->IsSameSubnet (*compatibleWith)) && (!checkIsReal || router->GetProfile ()->IsReal ()) && (!endpoint || (router->IsV4 () && (!reverse || router->IsPublished (true)))); // endpoint must be ipv4 and published if inbound(reverse)