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]Fixing the group option that should be taken from a socket #2912

Merged
merged 5 commits into from
Aug 14, 2024

Conversation

ethouris
Copy link
Collaborator

@ethouris ethouris commented Mar 11, 2024

Changed: Added a possibility to return the option value that was set on the socket, if there is at least one member.

The problem: this should rather concern only selected types of options, not all options. So far probably it should only
apply to the following options:

  • SRTO_RCVLATENCY, SRTO_PEERLATENCY, SRTO_LATENCY
  • SRTO_CRYPTOMODE

Without this the test will fail, and it's also not expected. We need this to work only for those options that could be altered as a result of the connection and involved parameter exchange.

Addresses #2918.

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

@maxsharabayko maxsharabayko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For SRTO_KMSTATE I suggest returning the least secure state among member sockets.
The order of security strength should be the following (from least secure to the most secure):

  1. SRT_KM_S_BADCRYPTOMODE – it is a connection rejection code, so maybe should be ignored or set only if no other members are there? 🤔
  2. SRT_KM_S_BADSECRET – the password is wrong (set differently on each party); encrypted payloads won't be decrypted.
  3. SRT_KM_S_NOSECRET – the sending party has set a passphrase, but the peer did not. In this case the sending party can receive unencrypted packets from the peer, but packets it sends to the peer will be encrypted and the peer will not be able to decrypt them.
  4. SRT_KM_S_SECURING – pending security (HSv4 only).
  5. SRT_KM_S_UNSECURED – no encryption/decryption.
  6. SRT_KM_S_SECURED

@maxsharabayko
Copy link
Collaborator

For SRTO_PBKEYLEN I suggest returning the shortest key length among member sockets.

srtcore/group.cpp Show resolved Hide resolved
srtcore/group.cpp Outdated Show resolved Hide resolved
@ethouris ethouris marked this pull request as ready for review August 14, 2024 09:12
Comment typo.

Co-authored-by: Maxim Sharabayko <[email protected]>
@maxsharabayko maxsharabayko merged commit bd071e1 into Haivision:master Aug 14, 2024
12 checks passed
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 this pull request may close these issues.

2 participants