mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 04:04:16 +00:00
don't set Firewalled upon SessionCreated if ports mismatch
This commit is contained in:
parent
2921eaa055
commit
a3c305032a
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013-2022, The PurpleI2P Project
|
||||
* Copyright (c) 2013-2023, The PurpleI2P Project
|
||||
*
|
||||
* This file is part of Purple i2pd project and licensed under BSD3
|
||||
*
|
||||
@ -240,7 +240,6 @@ namespace i2p
|
||||
if (status != m_Status)
|
||||
{
|
||||
m_Status = status;
|
||||
m_Error = eRouterErrorNone;
|
||||
switch (m_Status)
|
||||
{
|
||||
case eRouterStatusOK:
|
||||
@ -249,6 +248,9 @@ namespace i2p
|
||||
case eRouterStatusFirewalled:
|
||||
SetUnreachable (true, false); // ipv4
|
||||
break;
|
||||
case eRouterStatusTesting:
|
||||
m_Error = eRouterErrorNone;
|
||||
break;
|
||||
default:
|
||||
;
|
||||
}
|
||||
@ -260,7 +262,6 @@ namespace i2p
|
||||
if (status != m_StatusV6)
|
||||
{
|
||||
m_StatusV6 = status;
|
||||
m_ErrorV6 = eRouterErrorNone;
|
||||
switch (m_StatusV6)
|
||||
{
|
||||
case eRouterStatusOK:
|
||||
@ -269,6 +270,9 @@ namespace i2p
|
||||
case eRouterStatusFirewalled:
|
||||
SetUnreachable (false, true); // ipv6
|
||||
break;
|
||||
case eRouterStatusTesting:
|
||||
m_ErrorV6 = eRouterErrorNone;
|
||||
break;
|
||||
default:
|
||||
;
|
||||
}
|
||||
|
@ -1669,22 +1669,14 @@ namespace transport
|
||||
if (isV4)
|
||||
{
|
||||
if (i2p::context.GetStatus () == eRouterStatusTesting)
|
||||
{
|
||||
i2p::context.SetStatus (eRouterStatusFirewalled);
|
||||
i2p::context.SetError (eRouterErrorSymmetricNAT);
|
||||
m_Server.RescheduleIntroducersUpdateTimer ();
|
||||
}
|
||||
else if (m_State == eSSU2SessionStatePeerTest)
|
||||
i2p::context.SetError (eRouterErrorFullConeNAT);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (i2p::context.GetStatusV6 () == eRouterStatusTesting)
|
||||
{
|
||||
i2p::context.SetStatusV6 (eRouterStatusFirewalled);
|
||||
i2p::context.SetErrorV6 (eRouterErrorSymmetricNAT);
|
||||
m_Server.RescheduleIntroducersUpdateTimerV6 ();
|
||||
}
|
||||
else if (m_State == eSSU2SessionStatePeerTest)
|
||||
i2p::context.SetErrorV6 (eRouterErrorFullConeNAT);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user