fix(egfx): tolerate unknown capability versions instead of failing decode#1298
Open
clintcan wants to merge 1 commit into
Open
fix(egfx): tolerate unknown capability versions instead of failing decode#1298clintcan wants to merge 1 commit into
clintcan wants to merge 1 commit into
Conversation
…code `CapabilitySet::decode` propagated `CapabilityVersion::try_from`'s error via `?`, so a single unrecognized capability version aborted decoding of the whole CapabilitiesAdvertise PDU during EGFX negotiation. Some clients advertise a capset version outside the enumerated set — notably the macOS "Windows App" / Microsoft Remote Desktop client — which made the EGFX channel fail to negotiate and could prevent the connection from being established at all. The `CapabilitySet::Unknown(Vec<u8>)` variant already exists and round- trips raw bytes through encode/size. Route the unrecognized-version case into it instead of erroring, so negotiation completes and the server can still select a mutually supported capability version.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CapabilitySet::decodepropagatedCapabilityVersion::try_from's error via?, so a single unrecognized capability version aborted decoding of the entire CapabilitiesAdvertise PDU during EGFX negotiation.Some clients advertise a capset version outside the enumerated set — notably the macOS "Windows App" / Microsoft Remote Desktop client — which made the EGFX channel fail to negotiate and could prevent the connection from being established at all when the server enables EGFX.
The
CapabilitySet::Unknown(Vec<u8>)variant already exists and round-trips raw bytes throughencode/size. This routes the unrecognized-version case into it instead of erroring, so negotiation completes and the server can still select a mutually supported capability version.Verified against a real macOS Windows App client connecting to an EGFX/AVC420 server: without this change the connection aborts during negotiation; with it, negotiation completes and H.264 renders.