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] Fixed a bug that responded a repeated conclusion HS with rejection #1650

Merged
merged 8 commits into from
Dec 10, 2020
Merged
Show file tree
Hide file tree
Changes from 4 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
7 changes: 6 additions & 1 deletion srtcore/api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -490,9 +490,10 @@ SRTSOCKET CUDTUnited::newSocket(CUDTSocket** pps)
}

int CUDTUnited::newConnection(const SRTSOCKET listen, const sockaddr_any& peer, const CPacket& hspkt,
CHandShake& w_hs, int& w_error)
CHandShake& w_hs, int& w_error, CUDT*& w_acpu)
{
CUDTSocket* ns = NULL;
w_acpu = NULL;

w_error = SRT_REJ_IPE;

Expand Down Expand Up @@ -534,6 +535,10 @@ int CUDTUnited::newConnection(const SRTSOCKET listen, const sockaddr_any& peer,
w_hs.m_iReqType = URQ_CONCLUSION;
w_hs.m_iID = ns->m_SocketID;

// Report the original UDT because it will be
// required to complete the HS data for conclusion response.
w_acpu = ns->m_pUDT;

return 0;

//except for this situation a new connection should be started
Expand Down
2 changes: 1 addition & 1 deletion srtcore/api.h
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ friend class CRendezvousQueue;
/// @return If the new connection is successfully created: 1 success, 0 already exist, -1 error.

int newConnection(const SRTSOCKET listen, const sockaddr_any& peer, const CPacket& hspkt,
CHandShake& w_hs, int& w_error);
CHandShake& w_hs, int& w_error, CUDT*& w_acpu);

int installAcceptHook(const SRTSOCKET lsn, srt_listen_callback_fn* hook, void* opaq);
int installConnectHook(const SRTSOCKET lsn, srt_connect_callback_fn* hook, void* opaq);
Expand Down
Loading