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

Fix: rendezvous: do not reject incoming packet with id=0 when rendezvous #2548

Merged
merged 2 commits into from
Nov 25, 2022
Merged
Changes from 1 commit
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
22 changes: 19 additions & 3 deletions srtcore/queue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -897,10 +897,26 @@ void srt::CRendezvousQueue::updateConnStatus(EReadStatus rst, EConnectStatus cst
EReadStatus read_st = rst;
EConnectStatus conn_st = cst;

if (i->id != dest_id)
if (cst != CONN_RENDEZVOUS && dest_id != 0)
{
read_st = RST_AGAIN;
conn_st = CONN_AGAIN;
if (i->id != dest_id)
{
HLOGC(cnlog.Debug, log << "updateConnStatus: cst=" << ConnectStatusStr(cst) << " but for RID @" << i->id
<< " dest_id=@" << dest_id << " - resetting to AGAIN");

read_st = RST_AGAIN;
conn_st = CONN_AGAIN;
}
else
{
HLOGC(cnlog.Debug, log << "updateConnStatus: cst=" << ConnectStatusStr(cst) << " and update came for @"
ethouris marked this conversation as resolved.
Show resolved Hide resolved
<< i->id);
}
}
else
{
HLOGC(cnlog.Debug, log << "updateConnStatus: cst=" << ConnectStatusStr(cst) << " and dest_id=@" << dest_id
<< " - NOT checking against RID @" << i->id);
}

HLOGC(cnlog.Debug,
Expand Down