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

[BUG] Reject if the Extension Flags field does not contain the magic value (INDUCTION PHASE) #2494

Closed
1 of 2 tasks
maxsharabayko opened this issue Oct 19, 2022 · 0 comments · Fixed by #2495
Closed
1 of 2 tasks
Labels
[core] Area: Changes in SRT library core Type: Bug Indicates an unexpected problem or unintended behavior
Milestone

Comments

@maxsharabayko
Copy link
Collaborator

maxsharabayko commented Oct 19, 2022

According to the SRT Internet-Draft, if the Extension Flags field does not contain the magic value 0x4A17 the connection is rejected. This is a contingency for the case where someone who, in an attempt to extend UDT independently, increases the Version value to 5 and tries to test it against SRT.

Looking at the code, it does not seem to happen so:

EConnectStatus srt::CUDT::processConnectResponse(...)
        // ..
        if (m_ConnRes.m_iReqType == URQ_INDUCTION)
        {
            // ...
            if (m_ConnRes.m_iVersion > HS_VERSION_UDT4)
            {
                int hs_flags = SrtHSRequest::SRT_HSTYPE_HSFLAGS::unwrap(m_ConnRes.m_iType);

                if (hs_flags != SrtHSRequest::SRT_MAGIC_CODE)
                {
                    LOGC(cnlog.Warn,
                         log << CONID() << "processConnectResponse: Listener HSv5 did not set the SRT_MAGIC_CODE");
                }

As can be seen from the code, only a warning will be shown.

TODO:

  • Reproduce the behavior.
  • The rejection reason must be SRT_REJ_ROGUE.
@maxsharabayko maxsharabayko added Type: Bug Indicates an unexpected problem or unintended behavior [core] Area: Changes in SRT library core labels Oct 19, 2022
@maxsharabayko maxsharabayko added this to the v1.6.0 milestone Oct 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[core] Area: Changes in SRT library core Type: Bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant