Question about SDP mangling for DTLS role only during createAnswer

85 views
Skip to first unread message

Victor Cuenca

unread,
Jul 18, 2025, 8:34:46 AMJul 18
to discuss-webrtc
Hi all,

Is it allowed to perform SDP mangling to modify the DTLS role only for the answer SDP?

I’ve seen tests that verify no DTLS mangling occurs during the creation of the SDP offer, but I haven’t found any regarding mangling during the answer generation.
Also, from what I understand about how DTLS works, when the offer is created, the DTLS role is set to 'actpass', leaving the responsibility of choosing the role to the entity generating the answer.
When investigating the API, I see that the DTLS configuration can only be queried through the DtlsTransportInterface in PeerConnectionInterface, but it seems to be read-only via the Information() method.

Any insights or references to specifications/code on this would be really appreciated!

Thanks in advance!

Harald Alvestrand

unread,
Jul 18, 2025, 8:40:16 AMJul 18
to discuss...@googlegroups.com
What do you need to do?
The rules for DTLS role are set in RFC 8842 section 5 (you're looking at the "a=setup" attribute).

You're free to modify the SDP (if desired, and you know what you are doing) before it is sent to the other entity and used there with SetRemote* functions, for instance by changing "a=setup:actpass" to "a=setup:active" or "a=setup:passive", but modifying the SDP between CreateOffer/CreateAnswer and the SetLocal* functions is a practice we're trying to get to stop.

Harald


--
This list falls under the WebRTC Code of Conduct - https://webrtc.org/support/code-of-conduct.
---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/discuss-webrtc/b208629d-5610-4674-9c05-db10d0dece32n%40googlegroups.com.

Philipp Hancke

unread,
Jul 18, 2025, 9:33:53 AMJul 18
to discuss...@googlegroups.com
also note that offers can have a role other than actpass (for a couple of years now) which means they way to control the answer is to modify the remote description.

Reply all
Reply to author
Forward
0 new messages