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

Fixed Deriving and Getting the StreamID Socket Option on a Group #3075

Merged

Conversation

maxsharabayko
Copy link
Collaborator

  • Fix CUDTGroup::getOpt(..): check value length in group config storage. The storage could have empty strings, and dereferencing the first element must not happen.
  • Fixed deriving string options by a group. SRTO_STREAMID, SRTO_PACKETFILTER are directly affected. SRTO_PASSPHRASE was derived correctly.
  • Extended Bonding.Options unit test with Stream ID and linger set/get check.

Fixes #3072.

…storage.

The storage could have empty strings, and dereferencing the first element must not happen.
SRTO_STREAMID, SRTO_PACKETFILTER are directly affected.
SRTO_PASSPHRASE was derived correctly.
@maxsharabayko maxsharabayko added Type: Bug Indicates an unexpected problem or unintended behavior [core] Area: Changes in SRT library core labels Nov 14, 2024
@maxsharabayko maxsharabayko added this to the v1.5.5 milestone Nov 14, 2024
@maxsharabayko maxsharabayko changed the title Hotfix/set group opt streamid Fixed Deriving and Getting the StreamID Socket Option on a Group Nov 14, 2024
@maxsharabayko
Copy link
Collaborator Author

v1.5.4 Release Build on a local host. Note "Stream ID: not set" is reported by the receiver upon connection (srt_getsockopt fails to return a value, also std::vector out of range assertion will be triggered in a debug build).

(sender)
$> srt-xtransmit generate "srt://127.0.0.1:4200?grouptype=broadcast&streamid=abcdefg" --duration 1s --sendrate 100kbps
15:20:33.484373 [I] CONN Establishing connection no.1.
15:20:33.496851 [I] PACER sendrate 100000 bps (inter send interval 106382 us)
15:20:34.574192 [I] PIPE Pipe exit (conn @2093138386), 0 remain active.

(receiver)
$> srt-xtransmit receive srt://:4200?groupconnect=1
15:20:22.741243 [I] CONN Establishing connection no.1.
15:20:22.748278 [I] SOCKET::SRT srt://:4200: bound to ':4200'.
15:20:33.495838 [I] SOCKET::SRT @268705253 (srt://:4200) Accepted connection @1342447075. TSBPD Latency RCV 120ms, peer 0ms. KM state UNSECURED (RCV UNSECURED, SND UNSECURED). PB key length: 0. Cryptomode AUTO. Stream ID: not set.
15:20:34.872000/T87372*E:SRT.gr: grp/recv: $1342447075: ABANDONING: opened=false connected=false
15:20:34.872917 [W] RECEIVE read::recv: Connection does not exist
15:20:34.873611 [I] PIPE Pipe exit (conn @1342447075), 0 remain active.

With PR 3075 the Stream ID is correct (srt_getsockopt returns a correct value):

$> srt-xtransmit receive srt://:4200?groupconnect=1
15:33:02.551876 [I] CONN Establishing connection no.1.
15:33:02.556806 [I] SOCKET::SRT srt://:4200: bound to ':4200'.
15:33:03.495007 [I] SOCKET::SRT @700298265 (srt://:4200) Accepted connection @1774040087. TSBPD Latency RCV 120ms, peer 0ms. KM state UNSECURED (RCV UNSECURED, SND UNSECURED). PB key length: 0. Cryptomode AUTO. Stream ID: abcdefg.
15:33:04.579000/T71984*E:SRT.gr: grp/recv: $1774040087: ABANDONING: opened=false connected=false
15:33:04.580929 [W] RECEIVE read::recv: Connection does not exist
15:33:04.581270 [I] PIPE Pipe exit (conn @1774040087), 0 remain active.

@maxsharabayko maxsharabayko merged commit 6ab86d8 into Haivision:master Nov 14, 2024
12 checks passed
@maxsharabayko maxsharabayko deleted the hotfix/set-group-opt-streamid branch November 14, 2024 15:05
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.

[BUG] setting/getting SRTO_STREAMID to group socket is broken in SRT 1.5.4
1 participant