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] Send rejection handshake to the peer in rendezvous mode #2664

Closed
maxsharabayko opened this issue Feb 14, 2023 · 1 comment · Fixed by #2667
Closed

[BUG] Send rejection handshake to the peer in rendezvous mode #2664

maxsharabayko opened this issue Feb 14, 2023 · 1 comment · Fixed by #2667
Labels
[core] Area: Changes in SRT library core Type: Bug Indicates an unexpected problem or unintended behavior
Milestone

Comments

@maxsharabayko
Copy link
Collaborator

One side rejects the connection but sends the SHUTDOWN packet. The other side does not expect SHUTDOWN and proceeds to attempt connecting.
In the example below 5200 sends CONCLUSION without extensions first. Then receives CONCLUSION from the peer with extensions. And just sends the shutdown packet.

Issue no. 1. The other side should probably not proceed connecting if SHUTDOWN is received.
Issue no. 2. Peer 5200 should send HS CONCLUSION with rejection reason instead of SHUTDOWN?

.\srt-xtransmit receive "srt://127.0.0.1:4200?passphrase=abcdefghijk&cryptomode=2&bind=:5200&mode=rendezvous" -v
12:43:41.751514 [I] SOCKET::SRT srt://127.0.0.1:4200: bound to ':5200'.
12:43:41.752665 [D] SOCKET::SRT 0x2BEDFD6D ASYNC Connecting to srt://127.0.0.1:4200
12:43:42.111000/T39228!W:SRT.cn: KMREQ/rcv: (snd) Rx process failure - BADCRYPTOMODE
12:43:42.120000/T39228!W:SRT.cn: @737017197: processAsyncConnectRequest: REJECT reported from processRendezvous, not processing further.
12:43:42.133437 [D] SOCKET::SRT 0x2BEDFD6D connect failed. ERROR: Unknown or erroneous.
12:43:42.133890 [D] SOCKET::SRT 0x2BEDFD6D Releasing epolls before closing
12:43:42.134217 [D] SOCKET::SRT 0x2BEDFD6D Closing
12:43:42.135010 [W] CONN connect failed: Unknown or erroneous
\srt-xtransmit generate "srt://127.0.0.1:5200?passphrase=abcdefghijk&cryptomode=0&bind=:4200&mode=rendezvous" --sendrate 5Mbps -v
12:43:42.095155 [I] SOCKET::SRT srt://127.0.0.1:5200: bound to ':4200'.
12:43:42.096333 [D] SOCKET::SRT 0x11FB487 ASYNC Connecting to srt://127.0.0.1:5200
12:43:42.120000/T16452*E:SRT.cn: @18855047: processConnectResponse: CONFUSED: expected UMSG_HANDSHAKE as connection not yet established, got: shutdown
12:43:42.121000/T16452!W:SRT.cn: AsyncOrRND: PACKET NOT HANDSHAKE - re-requesting handshake from peer
12:44:12.116289 [D] SOCKET::SRT 0x11FB487 connect failed. ERROR: Rogue peer or incorrect parameters.
12:44:12.116729 [D] SOCKET::SRT 0x11FB487 Releasing epolls before closing
12:44:12.117228 [D] SOCKET::SRT 0x11FB487 Closing
12:44:12.117960 [W] CONN connect failed: Rogue peer or incorrect parameters

Maybe somehow affected by #2539.

@maxsharabayko maxsharabayko added Type: Bug Indicates an unexpected problem or unintended behavior [core] Area: Changes in SRT library core labels Feb 14, 2023
@maxsharabayko maxsharabayko added this to the v1.5.2 milestone Feb 14, 2023
@ethouris
Copy link
Collaborator

Fixed by #2667

@maxsharabayko maxsharabayko changed the title [BUG] Rendezvous handshake when SRTO_CRYPTOMODE mismatch [BUG] Send rejection handshake to the peer in rendezvous mode Feb 20, 2023
pkviet added a commit to pkviet/obs-deps that referenced this issue Jun 29, 2023
This updates srt to 1.5.2. This has a commit which fixes a bug with
rendezvous mode [1,2] in obs.

[1] Haivision/srt#2664
[2] Haivision/srt@1cffd2f
pkviet added a commit to pkviet/obs-deps that referenced this issue Jun 30, 2023
This updates srt to 1.5.2. This has a commit which fixes a bug with
rendezvous mode [1,2] in obs.

[1] Haivision/srt#2664
[2] Haivision/srt@1cffd2f
pkviet added a commit to pkviet/obs-deps that referenced this issue Jul 7, 2023
This updates libsrt to 1.5.2. This has a commit which fixes a bug with
rendezvous mode [1,2] in obs.

[1] Haivision/srt#2664
[2] Haivision/srt@1cffd2f
RytoEX pushed a commit to obsproject/obs-deps that referenced this issue Jul 12, 2023
This updates libsrt to 1.5.2. This has a commit which fixes a bug with
rendezvous mode [1,2] in obs.

[1] Haivision/srt#2664
[2] Haivision/srt@1cffd2f
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
2 participants