Skip to content

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

@maxsharabayko

Description

@maxsharabayko

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: BugIndicates an unexpected problem or unintended behavior[core]Area: Changes in SRT library core

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions