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] Getting some socket options on a group fails (SRTO_PBKEYLEN, SRTO_KMSTATE, SRTO_CRYPTOMODE) #2918

Open
maxsharabayko opened this issue Mar 13, 2024 · 1 comment
Labels
[core] Area: Changes in SRT library core Priority: High Type: Bug Indicates an unexpected problem or unintended behavior
Milestone

Comments

@maxsharabayko
Copy link
Collaborator

Getting some socket option values on a group now fails after PR #2891.

12:54:55.801857 [E] SOCKET::SRT Failed to get sockopt SRTO_PBKEYLEN.
12:54:55.803553 [E] SOCKET::SRT Failed to get sockopt SRTO_KMSTATE.
12:54:55.805568 [E] SOCKET::SRT Failed to get sockopt SRTO_CRYPTOMODE.

Reproduction

srt-xtransmit retrieves those socket option values after a connection is established to form this info log line

12:54:55.807114 [D] SOCKET::SRT_GROUP @2020430165 SYNC Group member connected to remote.
    TSBPD off. KM state INVALID (RCV UNSECURED, SND UNSECURED). PB key length: -1. Cryptomode INVALID. Stream ID: not set.

Reasons

SRTO_CRYPTOMODE is not set by the caller, so it is not in the m_config

    vector<ConfigItem>::const_iterator i = find_if(m_config.begin(), m_config.end(),
            FOptionValue(optname));

    if (i == m_config.end())
    {
        // Not found, see the defaults
        if (!getOptDefault(optname, (pw_optval), (w_optlen)))
            throw CUDTException(MJ_NOTSUP, MN_INVAL, 0);

        return;
    }
@maxsharabayko maxsharabayko added Type: Bug Indicates an unexpected problem or unintended behavior [core] Area: Changes in SRT library core labels Mar 13, 2024
@maxsharabayko maxsharabayko added this to the v1.5.4 milestone Mar 13, 2024
@ethouris
Copy link
Collaborator

ethouris commented Mar 13, 2024

A fix proposal is in #2912, but it needs refinement.

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 Priority: High Type: Bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants