mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 21:37:17 +01:00
reply with CANT_REACH_PEER if connect to outselves
This commit is contained in:
parent
dfe8b25e5e
commit
cd087568b5
|
@ -522,6 +522,8 @@ namespace client
|
|||
if (addr && addr->IsValid ())
|
||||
{
|
||||
if (addr->IsIdentHash ())
|
||||
{
|
||||
if (session->GetLocalDestination ()->GetIdentHash () != addr->identHash)
|
||||
{
|
||||
auto leaseSet = session->GetLocalDestination ()->FindLeaseSet(addr->identHash);
|
||||
if (leaseSet)
|
||||
|
@ -533,6 +535,9 @@ namespace client
|
|||
shared_from_this(), std::placeholders::_1));
|
||||
}
|
||||
}
|
||||
else
|
||||
SendStreamCantReachPeer ("Can't connect to myself");
|
||||
}
|
||||
else // B33
|
||||
session->GetLocalDestination ()->RequestDestinationWithEncryptedLeaseSet (addr->blindedPublicKey,
|
||||
std::bind(&SAMSocket::HandleConnectLeaseSetRequestComplete,
|
||||
|
|
Loading…
Reference in a new issue