Browse Source

MT#55283 add SDES-prefer option

Change-Id: I8c90c68a2c1a093d0a017d1edb6cac9b2f0bc5a1
pull/1752/head
Richard Fuchs 2 years ago
parent
commit
b265477654
4 changed files with 23 additions and 0 deletions
  1. +10
    -0
      daemon/call.c
  2. +4
    -0
      daemon/call_interfaces.c
  3. +8
    -0
      docs/ng_control_protocol.md
  4. +1
    -0
      include/call_interfaces.h

+ 10
- 0
daemon/call.c View File

@ -2104,6 +2104,16 @@ static void __dtls_logic(const struct sdp_ng_flags *flags,
&sp->sp_flags, SP_FLAG_SETUP_PASSIVE);
if (flags) {
/* Allow overriding preference of DTLS over SDES */
if ((flags->opmode == OP_OFFER || flags->opmode == OP_PUBLISH)
&& flags->sdes_prefer
&& MEDIA_ISSET(other_media, SDES))
{
MEDIA_CLEAR(other_media, DTLS);
MEDIA_CLEAR(other_media, SETUP_ACTIVE);
MEDIA_CLEAR(other_media, SETUP_PASSIVE);
}
/* Special case: if this is an offer and actpass is being offered (as it should),
* we would normally choose to be active. However, if this is a reinvite and we
* were passive previously, we should retain this role. */


+ 4
- 0
daemon/call_interfaces.c View File

@ -561,6 +561,10 @@ INLINE void ng_sdes_option(struct sdp_ng_flags *out, str *s, void *dummy) {
case CSH_LOOKUP("nonew"):
out->sdes_nonew = 1;
break;
case CSH_LOOKUP("prefer"):
case CSH_LOOKUP("priority"):
out->sdes_prefer = 1;
break;
default:
ilog(LOG_WARN, "Unknown 'SDES' flag encountered: '"STR_FORMAT"'",
STR_FMT(s));


+ 8
- 0
docs/ng_control_protocol.md View File

@ -637,6 +637,14 @@ Optionally included keys are:
and instead leave the previously negotiated crypto suite in place. Only useful in
subsequent `answer` messages and ignored in `offer` messages.
- `prefer`
If an `offer` or `publish` contain both DTLS and SDES options, by
default *rtpengine* prefers DTLS over SDES and would end up accepting
DTLS. With this option set, in this scenario SDES would be preferred
and accepted, while DTLS would be rejected. Useful in combination with
`DTLS=off`.
* `supports`
Contains a list of strings. Each string indicates support for an additional feature


+ 1
- 0
include/call_interfaces.h View File

@ -195,6 +195,7 @@ struct sdp_ng_flags {
sdes_pad:1,
sdes_static:1,
sdes_nonew:1,
sdes_prefer:1,
drop_traffic_start:1,
drop_traffic_stop:1,
passthrough_on:1,


Loading…
Cancel
Save