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

Fixes for unusual rendezvous connection rejection cases #414

Merged

Conversation

ethouris
Copy link
Collaborator

This fixes the problem that arisen when the KMX process failed due to either no password set or bad password. The transmission should fail anyway, but the connection should be still set up correctly, and the transmission should send the packets - they shall be only unable to be decrypted. In the opposite direction the transmission should be allowed anyway. It should also show correct encryption state. This fixes the problem that in case when BADSECRET or NOSECRET situation the repeated handshake attempt was trying to extract the recorded key from previous KMREQ, which wasn't recorded due to that error, and it resulted in rejection instead of sending back the 1-word KMX failure status, if there's no key possible to be sent. The peer should receive the KMX failure, but only setup a failed encryption state on itself, not break the connection, and the transmission from a party that set no encryption should be anyway possible.

Another fix repairs the problem when a rendezvous handshake comes in when it is already received due to having bound socket, but before registerConnector was called (these things happen in two different threads), which means that in this period any packet incoming from peer has no chance to be dispatched and it's treated as a rogue packet. The incorrect reaction was to reject the handshake and cause the connection process to be broken. This, instead, ignores the packet, which means that the peer will simply send it again, this time most likely when the connector is already registerred and therefore the packet will be correctly dispatched.

…rejection. Fixed handling of BADSECRET/NOSECRET states in case of periodic HS
@rndi rndi merged commit e9e0611 into Haivision:master Jun 13, 2018
@ethouris ethouris deleted the dev-fix-rendezvous-processing-rejection-2 branch January 23, 2019 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants