From abe442a0c258f70a883afe1b74c1f81afb5fe50d Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Mon, 11 May 2026 12:07:58 -0400 Subject: [PATCH] MT#55283 ignore ICE=force for answer SDPs It doesn't make sense to produce an answer SDP with ICE attributes (and enabling ICE processing) if the offer didn't indicate ICE support. Closes #2106 Change-Id: I7cc6083beffc3f76f34c965049e8179866df2e6f (cherry picked from commit eb108705b2cb9b06bf237779d757271170420a7a) --- daemon/call.c | 6 ++++-- t/auto-daemon-tests.pl | 45 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 2 deletions(-) diff --git a/daemon/call.c b/daemon/call.c index 46008ba78..f771eb048 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -1431,8 +1431,10 @@ static void __ice_offer(const sdp_ng_flags *flags, struct call_media *this, // unless instructed not to if (flags->ice_option == ICE_REMOVE) MEDIA_CLEAR(this, ICE); - else if (flags->ice_option != ICE_DEFAULT) - MEDIA_SET(this, ICE); + else if (flags->ice_option != ICE_DEFAULT) { + if (flags->opmode != OP_ANSWER && flags->opmode != OP_PUBLISH) + MEDIA_SET(this, ICE); + } if (flags->ice_reject) MEDIA_CLEAR(other, ICE); diff --git a/t/auto-daemon-tests.pl b/t/auto-daemon-tests.pl index 6015ea44a..9f5f4561f 100755 --- a/t/auto-daemon-tests.pl +++ b/t/auto-daemon-tests.pl @@ -1139,6 +1139,51 @@ rcv($sock_b, $port_a, rtpm(98 | 0x80, 7003, 9480, 0x75336ce, "\x08\x0f\x00\xa0") +new_call; + +offer('ICE=force in answer', { }, < 'force'}, < ['require'] }, <