Skip to content

Commit

Permalink
[core] Fixed bug: listener callback was changing SRTO_GROUPCONNECT op…
Browse files Browse the repository at this point in the history
…tion. Made premature rejection if groups not allowed. (#1491)
  • Loading branch information
ethouris committed Aug 21, 2020
1 parent 98e86d1 commit 87df928
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions srtcore/common.cpp
Expand Up @@ -547,6 +547,7 @@ std::string MessageTypeStr(UDTMessageType mt, uint32_t extt)
"EXT:kmrsp",
"EXT:sid",
"EXT:congctl",
"EXT:filter",
"EXT:group"
};

Expand Down
5 changes: 5 additions & 0 deletions srtcore/core.cpp
Expand Up @@ -11345,6 +11345,11 @@ bool CUDT::runAcceptHook(CUDT *acore, const sockaddr* peer, const CHandShake& hs
break;
}
}
if (have_group && acore->m_OPT_GroupConnect == 0)
{
HLOGC(mglog.Debug, log << "runAcceptHook: REJECTING connection WITHOUT calling the hook - groups not allowed");
return false;
}

// Update the groupconnect flag
acore->m_OPT_GroupConnect = have_group ? 1 : 0;
Expand Down

0 comments on commit 87df928

Please sign in to comment.