mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 08:14:15 +00:00
don't accept incoming session from invalid endpoint
This commit is contained in:
parent
3471e6fe16
commit
c5230ca44b
@ -534,13 +534,15 @@ namespace transport
|
|||||||
else
|
else
|
||||||
it1->second->ProcessRetry (buf, len);
|
it1->second->ProcessRetry (buf, len);
|
||||||
}
|
}
|
||||||
else
|
else if (!i2p::util::net::IsInReservedRange(senderEndpoint.address ()) && senderEndpoint.port ())
|
||||||
{
|
{
|
||||||
// assume new incoming session
|
// assume new incoming session
|
||||||
auto session = std::make_shared<SSU2Session> (*this);
|
auto session = std::make_shared<SSU2Session> (*this);
|
||||||
session->SetRemoteEndpoint (senderEndpoint);
|
session->SetRemoteEndpoint (senderEndpoint);
|
||||||
session->ProcessFirstIncomingMessage (connID, buf, len);
|
session->ProcessFirstIncomingMessage (connID, buf, len);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
LogPrint (eLogError, "SSU2: Incoming packet received from invalid endpoint ", senderEndpoint);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user