mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-23 17:34:21 +00:00
don't handle TunnelBuild message for ECIES router
This commit is contained in:
parent
4ba1be2dc0
commit
07b77443dd
@ -448,7 +448,7 @@ namespace i2p
|
|||||||
{
|
{
|
||||||
int num = buf[0];
|
int num = buf[0];
|
||||||
LogPrint (eLogDebug, "I2NP: VariableTunnelBuild ", num, " records");
|
LogPrint (eLogDebug, "I2NP: VariableTunnelBuild ", num, " records");
|
||||||
if (len < num*BUILD_REQUEST_RECORD_CLEAR_TEXT_SIZE + 1)
|
if (len < num*TUNNEL_BUILD_RECORD_SIZE + 1)
|
||||||
{
|
{
|
||||||
LogPrint (eLogError, "VaribleTunnelBuild message of ", num, " records is too short ", len);
|
LogPrint (eLogError, "VaribleTunnelBuild message of ", num, " records is too short ", len);
|
||||||
return;
|
return;
|
||||||
@ -516,7 +516,12 @@ namespace i2p
|
|||||||
|
|
||||||
void HandleTunnelBuildMsg (uint8_t * buf, size_t len)
|
void HandleTunnelBuildMsg (uint8_t * buf, size_t len)
|
||||||
{
|
{
|
||||||
if (len < NUM_TUNNEL_BUILD_RECORDS*BUILD_REQUEST_RECORD_CLEAR_TEXT_SIZE)
|
if (i2p::context.IsECIES ())
|
||||||
|
{
|
||||||
|
LogPrint (eLogWarning, "TunnelBuild is too old for ECIES router");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (len < NUM_TUNNEL_BUILD_RECORDS*TUNNEL_BUILD_RECORD_SIZE)
|
||||||
{
|
{
|
||||||
LogPrint (eLogError, "TunnelBuild message is too short ", len);
|
LogPrint (eLogError, "TunnelBuild message is too short ", len);
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user