change network status back to OK if port in msg 7 matches

This commit is contained in:
orignal 2022-12-21 18:14:19 -05:00
parent e4ddc883d2
commit 36501fe31e

View File

@ -1661,6 +1661,7 @@ namespace transport
bool isV4 = ep.address ().is_v4 (); bool isV4 = ep.address ().is_v4 ();
if (ep.port () != m_Server.GetPort (isV4)) if (ep.port () != m_Server.GetPort (isV4))
{ {
LogPrint (eLogInfo, "SSU2: Our port ", ep.port (), " received from ", m_RemoteEndpoint, " is different from ", m_Server.GetPort (isV4));
if (isV4) if (isV4)
{ {
if (i2p::context.GetStatus () == eRouterStatusTesting || if (i2p::context.GetStatus () == eRouterStatusTesting ||
@ -1687,12 +1688,18 @@ namespace transport
if (isV4) if (isV4)
{ {
if (i2p::context.GetError () == eRouterErrorSymmetricNAT) if (i2p::context.GetError () == eRouterErrorSymmetricNAT)
{
i2p::context.SetError (eRouterErrorNone); i2p::context.SetError (eRouterErrorNone);
if (m_State == eSSU2SessionStatePeerTest)
i2p::context.SetStatus (eRouterStatusOK);
}
} }
else else
{ {
if (i2p::context.GetErrorV6 () == eRouterErrorSymmetricNAT) if (i2p::context.GetErrorV6 () == eRouterErrorSymmetricNAT)
i2p::context.SetErrorV6 (eRouterErrorNone); i2p::context.SetErrorV6 (eRouterErrorNone);
if (m_State == eSSU2SessionStatePeerTest)
i2p::context.SetStatusV6 (eRouterStatusOK);
} }
} }
} }