mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-11 00:57:53 +00:00
reset routing path if duplicated SYN received
This commit is contained in:
parent
285e693a4e
commit
39e16824b9
@ -1184,6 +1184,16 @@ namespace stream
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Stream::ResetRoutingPath ()
|
||||||
|
{
|
||||||
|
m_CurrentOutboundTunnel = nullptr;
|
||||||
|
m_CurrentRemoteLease = nullptr;
|
||||||
|
m_RTT = INITIAL_RTT;
|
||||||
|
m_RTO = INITIAL_RTO;
|
||||||
|
if (m_RoutingSession)
|
||||||
|
m_RoutingSession->SetSharedRoutingPath (nullptr); // TODO: count failures
|
||||||
|
}
|
||||||
|
|
||||||
StreamingDestination::StreamingDestination (std::shared_ptr<i2p::client::ClientDestination> owner, uint16_t localPort, bool gzip):
|
StreamingDestination::StreamingDestination (std::shared_ptr<i2p::client::ClientDestination> owner, uint16_t localPort, bool gzip):
|
||||||
m_Owner (owner), m_LocalPort (localPort), m_Gzip (gzip),
|
m_Owner (owner), m_LocalPort (localPort), m_Gzip (gzip),
|
||||||
m_PendingIncomingTimer (m_Owner->GetService ())
|
m_PendingIncomingTimer (m_Owner->GetService ())
|
||||||
@ -1264,6 +1274,7 @@ namespace stream
|
|||||||
{
|
{
|
||||||
// already pending
|
// already pending
|
||||||
LogPrint(eLogWarning, "Streaming: Incoming streaming with rSID=", receiveStreamID, " already exists");
|
LogPrint(eLogWarning, "Streaming: Incoming streaming with rSID=", receiveStreamID, " already exists");
|
||||||
|
it1->second->ResetRoutingPath (); // Ack was not delivered, changing path
|
||||||
DeletePacket (packet); // drop it, because previous should be connected
|
DeletePacket (packet); // drop it, because previous should be connected
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -180,6 +180,7 @@ namespace stream
|
|||||||
bool IsEstablished () const { return m_SendStreamID; };
|
bool IsEstablished () const { return m_SendStreamID; };
|
||||||
StreamStatus GetStatus () const { return m_Status; };
|
StreamStatus GetStatus () const { return m_Status; };
|
||||||
StreamingDestination& GetLocalDestination () { return m_LocalDestination; };
|
StreamingDestination& GetLocalDestination () { return m_LocalDestination; };
|
||||||
|
void ResetRoutingPath ();
|
||||||
|
|
||||||
void HandleNextPacket (Packet * packet);
|
void HandleNextPacket (Packet * packet);
|
||||||
void HandlePing (Packet * packet);
|
void HandlePing (Packet * packet);
|
||||||
|
Loading…
Reference in New Issue
Block a user