tcp: Ensure that congestion state is set after every notification
This commit is contained in:
@@ -2028,6 +2028,7 @@ TcpSocketBase::ProcessSynSent (Ptr<Packet> packet, const TcpHeader& tcpHeader)
|
||||
{ // Bare data, accept it and move to ESTABLISHED state. This is not a normal behaviour. Remove this?
|
||||
NS_LOG_DEBUG ("SYN_SENT -> ESTABLISHED");
|
||||
m_congestionControl->CongestionStateSet (m_tcb, TcpSocketState::CA_OPEN);
|
||||
m_tcb->m_congState = TcpSocketState::CA_OPEN;
|
||||
m_state = ESTABLISHED;
|
||||
m_connected = true;
|
||||
m_retxEvent.Cancel ();
|
||||
@@ -2065,6 +2066,7 @@ TcpSocketBase::ProcessSynSent (Ptr<Packet> packet, const TcpHeader& tcpHeader)
|
||||
{ // Handshake completed
|
||||
NS_LOG_DEBUG ("SYN_SENT -> ESTABLISHED");
|
||||
m_congestionControl->CongestionStateSet (m_tcb, TcpSocketState::CA_OPEN);
|
||||
m_tcb->m_congState = TcpSocketState::CA_OPEN;
|
||||
m_state = ESTABLISHED;
|
||||
m_connected = true;
|
||||
m_retxEvent.Cancel ();
|
||||
@@ -2123,6 +2125,7 @@ TcpSocketBase::ProcessSynRcvd (Ptr<Packet> packet, const TcpHeader& tcpHeader,
|
||||
// handshake is completed nicely.
|
||||
NS_LOG_DEBUG ("SYN_RCVD -> ESTABLISHED");
|
||||
m_congestionControl->CongestionStateSet (m_tcb, TcpSocketState::CA_OPEN);
|
||||
m_tcb->m_congState = TcpSocketState::CA_OPEN;
|
||||
m_state = ESTABLISHED;
|
||||
m_connected = true;
|
||||
m_retxEvent.Cancel ();
|
||||
|
||||
Reference in New Issue
Block a user