From 16583ef76e6ce56278c3da2d1e7bbdeadad5bcc7 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Tue, 8 Mar 2022 11:19:08 -0500 Subject: [PATCH] TT#166107 fix stray ICE reset with rtcp-mux=require Since we're creating a dummy sfd to hold the SRTCP context when we don't have an actual RTCP port, we must make sure to remember and re-use this dummy sfd during a re-invite. Otherwise we end up creating a duplicate dummy sfd, which is detected as a different sfd and thus triggers an ICE restart. Change-Id: Iadc91e163bd15a3cd5f57656b52941724c920143 --- daemon/call.c | 2 ++ t/auto-daemon-tests.pl | 58 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) diff --git a/daemon/call.c b/daemon/call.c index 395337b18..83e6058ed 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -1029,6 +1029,8 @@ static void __assign_stream_fds(struct call_media *media, GQueue *intf_sfds) { struct intf_list *il = l->data; struct stream_fd *sfd = g_queue_peek_nth(&il->list, ps->component - 1); + if (!sfd) + sfd = ps->selected_sfd; if (!sfd) { // create a dummy sfd. needed to hold RTCP crypto context when // RTCP-mux is in use diff --git a/t/auto-daemon-tests.pl b/t/auto-daemon-tests.pl index 1738dc812..da0ffd2bf 100755 --- a/t/auto-daemon-tests.pl +++ b/t/auto-daemon-tests.pl @@ -1276,6 +1276,64 @@ is($ufrag_a, $ufrag_b, 'ufrag match'); new_call; +($port_a, $port_ax, $ufrag_a) = offer('ICE re-invite w rtcp-mux', + { ICE => 'force', 'rtcp-mux' => ['require'] }, < 'force', 'rtcp-mux' => ['require'] }, < 'force', flags => ['no port latching']}, <