Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core] Fix: In rendezvous when processing resulted in ACCEPT it was still sending rejection #2774

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 15 additions & 8 deletions srtcore/core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3689,14 +3689,20 @@ void srt::CUDT::startConnect(const sockaddr_any& serv_addr, int32_t forced_isn)
if (cst == CONN_CONTINUE)
continue;

// Just in case it wasn't set, set this as a fallback
if (m_RejectReason == SRT_REJ_UNKNOWN)
m_RejectReason = SRT_REJ_ROGUE;
HLOGC(cnlog.Debug,
log << CONID() << "startConnect: processRendezvous returned cst=" << ConnectStatusStr(cst));

// rejection or erroneous code.
reqpkt.setLength(m_iMaxSRTPayloadSize);
reqpkt.setControl(UMSG_HANDSHAKE);
sendRendezvousRejection(serv_addr, (reqpkt));
if (cst == CONN_REJECT)
{
// Just in case it wasn't set, set this as a fallback
if (m_RejectReason == SRT_REJ_UNKNOWN)
m_RejectReason = SRT_REJ_ROGUE;

// rejection or erroneous code.
reqpkt.setLength(m_iMaxSRTPayloadSize);
reqpkt.setControl(UMSG_HANDSHAKE);
sendRendezvousRejection(serv_addr, (reqpkt));
}
}

if (cst == CONN_REJECT)
Expand Down Expand Up @@ -4679,7 +4685,8 @@ bool srt::CUDT::applyResponseSettings(const CPacket* pHspkt /*[[nullable]]*/) AT

HLOGC(cnlog.Debug,
log << CONID() << "applyResponseSettings: HANSHAKE CONCLUDED. SETTING: payload-size=" << m_iMaxSRTPayloadSize
<< " mss=" << m_ConnRes.m_iMSS << " flw=" << m_ConnRes.m_iFlightFlagSize << " isn=" << m_ConnRes.m_iISN
<< " mss=" << m_ConnRes.m_iMSS << " flw=" << m_ConnRes.m_iFlightFlagSize << " peer-ISN=" << m_ConnRes.m_iISN
<< " local-ISN=" << m_iISN
<< " peerID=" << m_ConnRes.m_iID
<< " sourceIP=" << m_SourceAddr.str());
return true;
Expand Down