From 8a62497fc3a7ab2f5afb017d207b2991c4e8ad16 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Tue, 28 Jul 2026 10:41:28 -0400 Subject: [PATCH] MT#65570 support ICE2 flag Change-Id: Ie813564d94ada66b79f8b68e6f454de6b849da2c --- daemon/call.c | 4 ++ daemon/call_flags.c | 4 ++ include/call_flags.h | 1 + t/auto-daemon-tests.pl | 98 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 107 insertions(+) diff --git a/daemon/call.c b/daemon/call.c index 7561adfaa..7c0922b3c 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -1505,6 +1505,8 @@ static void __ice_offer(const sdp_ng_flags *flags, struct call_media *this, if (flags->trickle_ice) MEDIA_SET(this, TRICKLE_ICE); + if (flags->ice2) + MEDIA_SET(this, ICE2); } else if (flags->opmode == OP_SUBSCRIBE_REQ) { // leave source media (`other`) alone @@ -1523,6 +1525,8 @@ static void __ice_offer(const sdp_ng_flags *flags, struct call_media *this, if (flags->trickle_ice) MEDIA_SET(this, TRICKLE_ICE); + if (flags->ice2) + MEDIA_SET(this, ICE2); } /* determine roles (even if we don't actually do ICE) */ diff --git a/daemon/call_flags.c b/daemon/call_flags.c index 564488c1d..6b6cdd4dd 100644 --- a/daemon/call_flags.c +++ b/daemon/call_flags.c @@ -1447,6 +1447,10 @@ const char *call_ng_flags_ice(str *s, unsigned int idx, sdp_ng_flags *out) { case CSH_LOOKUP("trickle"): out->trickle_ice = true; break; + case CSH_LOOKUP("ice2"): + case CSH_LOOKUP("ICE2"): + out->ice2 = true; + break; default: ilog(LOG_WARN, "Unknown 'ICE' flag encountered: '" STR_FORMAT "'", STR_FMT(s)); diff --git a/include/call_flags.h b/include/call_flags.h index be9694bd8..bbf5128a6 100644 --- a/include/call_flags.h +++ b/include/call_flags.h @@ -235,6 +235,7 @@ RTPE_NG_FLAGS_STR_CASE_HT_PARAMS rtcp_mirror:1, mix:1, trickle_ice:1, + ice2:1, no_rtcp_attr:1, no_tls_id:1, full_rtcp_attr:1, diff --git a/t/auto-daemon-tests.pl b/t/auto-daemon-tests.pl index 2b7c89ae9..333724859 100755 --- a/t/auto-daemon-tests.pl +++ b/t/auto-daemon-tests.pl @@ -29052,6 +29052,104 @@ SDP +new_call; + +offer('webrtc ice2', { flags => ['WebRTC'], ICE => ['ICE2'] }, < ['remove'] }, < ft(), SDP => "v=0\no=- 1545997027 1 IN IP4 198.51.101.40\ns=tester\nt=0 0\nm=audio 3000 RTP/AVP 0 8\nc=IN IP4 198.51.100.1\na=foobar\n" } );