MT#55283 ice: avoid forcing ICE in a non-ICE answer without an ICE agent

Closes #2207

Change-Id: I174419dc418f0d2e0b9b05908d6b17dabf6a3d57
(cherry picked from commit 653650d1cc)
(cherry picked from commit a542784f18)
mr26.3.1
Darwvin 1 month ago committed by Richard Fuchs
parent e0f312b9da
commit cf99259a02

@ -1428,6 +1428,14 @@ static void __ice_offer(const sdp_ng_flags *flags, struct call_media *this,
if (flags->ice_reject)
MEDIA_CLEAR(other, ICE);
// An answer must not introduce ICE where the original offer did not
// advertise it. A locally created ICE agent means we intentionally
// offered ICE on this leg, in which case keep the negotiated state.
// In other cases ignore ICE=force on the answer (see issue #2161).
if (flags->opmode == OP_ANSWER && flags->ice_option == ICE_FORCE &&
!MEDIA_ISSET(other, ICE) && !this->ice_agent)
MEDIA_CLEAR(this, ICE);
if (flags->passthrough_on) {
ilog(LOG_DEBUG, "enabling passthrough mode");
MEDIA_SET(this, PASSTHRU);

Loading…
Cancel
Save