fix(sdp): reflect rejected m-lines (port=0) in answer per RFC 8829 §5.3.1#67
Open
nightness wants to merge 1 commit intowebrtc-rs:masterfrom
Open
fix(sdp): reflect rejected m-lines (port=0) in answer per RFC 8829 §5.3.1#67nightness wants to merge 1 commit intowebrtc-rs:masterfrom
nightness wants to merge 1 commit intowebrtc-rs:masterfrom
Conversation
….3.1 When an offer contains a rejected m-line (port=0 / no direction), the answer must reflect it in the same position with port=0 to preserve m-line indexing. Without this, re-offers after a rejected section would mis-map subsequent transceivers. Adds `rejected` / `rejected_kind` fields to `MediaSection` (all existing construction sites use `..Default::default()` so there is no breakage). `populate_sdp` emits a minimal port=0 section for rejected lines before the normal transceiver loop. `generate_matched_sdp` now pushes a rejected `MediaSection` instead of silently skipping a section whose direction is `Unspecified`. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 tasks
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.
Summary
rejected/rejected_kindfields toMediaSection(all existing construction sites use..Default::default()— no breakage).populate_sdpnow emits a minimalport=0m-line for each rejected section before the normal transceiver loop.generate_matched_sdppushes a rejectedMediaSectioninstead of silently skipping a section whose direction isUnspecified(port=0 in offer).Why This Matters (RFC 8829 §5.3.1)
Without this fix, a remote peer that sends an offer with one or more
rejected m-lines will get an answer whose m-line indices are shifted,
causing subsequent re-offers to mis-map transceivers.
Test Plan
cargo build -p rtcpasses (verified)🤖 Generated with Claude Code