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] Fixed version rejection for HSv4 caller #2010

Merged

Conversation

ethouris
Copy link
Collaborator

@ethouris ethouris commented May 18, 2021

Fixes #2008 (although maybe partially)

The problem: HSv4 connection procedure didn't predict rejection on minimum version.

The problem with HSv4 version is that the connection is fully made in UDT terms, and HSREQ extension will be sent later as an extended message, and at this time it's way too late to decide about rejection. Therefore the full version check is impossible to be implemented for HSv4 clients.

However it's possible to reject any HSv4 clients if the minimum version is set to the version that supports HSv5, that is, 1.3.0. The rule is that if a client supports HSv5, it must use HSv5 connection method, if the other party accepts it. This means that the HSv5 listener must respond with HSv5 if it supports it, and then the caller cannot use HSv4 against a listener that reports HSv5.

The fix then simply rejects, as a listener, any caller that tries to use HSv4, if the minimum version is 1.3.0 or higher. Of course, if the minimum version is set 1.2.3, then clients using 1.2.0 version will be accepted - this rejection isn't possible to be implemented.

Also, the rejection of HSv4 clients uses SHUTDOWN message instead of rejection handshake because HSv4 versions don't have the rejection hadnshake handling properly implemented and consider themselves connected upon reception of a handshake, even if it contains error code. During the tests it has been found out that the HSv4 clients stubbornly stay connected even after reception of SHUTDOWN during the handshake, but at least then an attempt to send fails.

@ethouris ethouris requested a review from maxsharabayko May 18, 2021 08:32
@ethouris ethouris added [core] Area: Changes in SRT library core Type: Bug Indicates an unexpected problem or unintended behavior labels May 18, 2021
@ethouris ethouris added this to the v1.4.4 milestone May 18, 2021
@maxsharabayko maxsharabayko merged commit 345bab7 into Haivision:master May 18, 2021
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] Minversion parameter not working as expected in v1.4.3
2 participants