Browse Source

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
mr10.4
Richard Fuchs 4 years ago
parent
commit
16583ef76e
2 changed files with 60 additions and 0 deletions
  1. +2
    -0
      daemon/call.c
  2. +58
    -0
      t/auto-daemon-tests.pl

+ 2
- 0
daemon/call.c View File

@ -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


+ 58
- 0
t/auto-daemon-tests.pl View File

@ -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'] }, <<SDP);
v=0
o=- 1545997027 1 IN IP4 198.51.101.40
s=tester
t=0 0
m=audio 16478 RTP/AVP 8
c=IN IP4 198.51.100.1
----------------------------------
v=0
o=- 1545997027 1 IN IP4 198.51.101.40
s=tester
t=0 0
m=audio PORT RTP/AVP 8
c=IN IP4 203.0.113.1
a=rtpmap:8 PCMA/8000
a=sendrecv
a=rtcp:PORT
a=rtcp-mux
a=ice-ufrag:ICEUFRAG
a=ice-pwd:ICEPWD
a=candidate:ICEBASE 1 UDP 2130706431 203.0.113.1 PORT typ host
a=candidate:ICEBASE 1 UDP 2130706175 2001:db8:4321::1 PORT typ host
SDP
is($port_a, $port_ax, 'port match');
($port_b, $port_bx, $ufrag_b) = offer('ICE re-invite w rtcp-mux',
{ ICE => 'force', 'rtcp-mux' => ['require'] }, <<SDP);
v=0
o=- 1545997027 1 IN IP4 198.51.101.40
s=tester
t=0 0
m=audio 16478 RTP/AVP 8
c=IN IP4 198.51.100.1
----------------------------------
v=0
o=- 1545997027 1 IN IP4 198.51.101.40
s=tester
t=0 0
m=audio PORT RTP/AVP 8
c=IN IP4 203.0.113.1
a=rtpmap:8 PCMA/8000
a=sendrecv
a=rtcp:PORT
a=rtcp-mux
a=ice-ufrag:ICEUFRAG
a=ice-pwd:ICEPWD
a=candidate:ICEBASE 1 UDP 2130706431 203.0.113.1 PORT typ host
a=candidate:ICEBASE 1 UDP 2130706175 2001:db8:4321::1 PORT typ host
SDP
is($port_b, $port_bx, 'port match');
is($port_a, $port_b, 'port match');
is($ufrag_a, $ufrag_b, 'ufrag match');
new_call;
($port_a, undef, $ufrag_a) = offer('ICE re-invite',
{ ICE => 'force', flags => ['no port latching']}, <<SDP);
v=0


Loading…
Cancel
Save