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

ua: use sdp connection data instead origin #2298

Merged
merged 2 commits into from
Nov 9, 2022
Merged

Conversation

sreimers
Copy link
Member

@sreimers sreimers commented Nov 2, 2022

WebRTC based clients use always IP4 127.0.0.1 or IP4 0.0.0.0 as origin <addrtype> <unicast-address> for privacy reasons.

https://www.rfc-editor.org/rfc/rfc4566.html#section-5.2

 For privacy reasons, it is sometimes desirable to obfuscate the
   username and IP address of the session originator.  If this is a
   concern, an arbitrary <username> and private <unicast-address> MAY be
   chosen to populate the "o=" field, provided that these are selected
   in a manner that does not affect the global uniqueness of the field.

@sreimers sreimers marked this pull request as ready for review November 2, 2022 11:53
@sreimers sreimers requested a review from cspiel1 November 2, 2022 12:13
@sreimers
Copy link
Member Author

sreimers commented Nov 2, 2022

I wonder if sdp origin address is reliable at all?

@alfredh
Copy link
Collaborator

alfredh commented Nov 3, 2022

it is probably better to use the SDP Connection field instead.

A valid SDP must have one or more connection fields, either one in the session level,
or one in the media levels.

@sreimers sreimers changed the title ua: fix sdp origin WebRTC loopback and possible mem leak ua: ignore sdp origin WebRTC and fix possible mem leak Nov 3, 2022
@sreimers sreimers changed the title ua: ignore sdp origin WebRTC and fix possible mem leak ua: ignore sdp origin loopback and any address Nov 3, 2022
@sreimers sreimers force-pushed the sdp_loopback_webrtc_fix branch from 2c32dfe to 5e6445e Compare November 4, 2022 10:29
@sreimers sreimers marked this pull request as draft November 4, 2022 10:29
@sreimers sreimers changed the title ua: ignore sdp origin loopback and any address ua: use sdp connection data instead origin Nov 4, 2022
@sreimers sreimers force-pushed the sdp_loopback_webrtc_fix branch from 5e6445e to a9343e7 Compare November 4, 2022 10:45
@sreimers
Copy link
Member Author

sreimers commented Nov 4, 2022

@cspiel1 can you check if sdp connection-address works for you? it looks like its used only for preferred address family detection and should more reliable than origin.

WebRTC based clients use always IP4 127.0.0.1 or IP4 0.0.0.0 as origin <addrtype> <unicast-address> for privacy reasons.

@sreimers sreimers marked this pull request as ready for review November 4, 2022 10:59
@sreimers sreimers merged commit 5923796 into main Nov 9, 2022
@sreimers sreimers deleted the sdp_loopback_webrtc_fix branch November 9, 2022 09:48
@cspiel1
Copy link
Collaborator

cspiel1 commented Nov 9, 2022

Okay, I will test it. I also think that this is an improvement.

@cspiel1
Copy link
Collaborator

cspiel1 commented Nov 10, 2022

I tested with:

  • IPv4
  • IPv6
  • IPv6 link local

Result:

  • The logging ua: using connection-address ... of SDP offer was printed like expected.
  • Audio+Video works in both directions.

Everything works correclty.

@sreimers
Copy link
Member Author

Thanks

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.

3 participants