diff options
author | Joshua Colp <jcolp@digium.com> | 2014-10-08 18:47:32 +0000 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2014-10-08 18:47:32 +0000 |
commit | 8b0089ea1dd8a50d7583d5c09b120fa4490853c6 (patch) | |
tree | dec9bb801760af086618951eab6437efad433bb0 /res | |
parent | 5e50638539f583e094b09e0a30f105d47af57d89 (diff) |
res_rtp_asterisk: Allow only UDP ICE candidates.
The underlying library, pjnath, that res_rtp_asterisk uses for ICE
support does not have support for ICE-TCP. As candidates are
passed through directly to it this can cause error messages to occur
when it receives something unexpected (such as a TCP candidate).
This change merely ignores all non-UDP candidates so they never
reach pjnath.
ASTERISK-24326 #close
Reported by: Joshua Colp
........
Merged revisions 424852 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 424853 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 424854 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424855 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res')
-rw-r--r-- | res/res_rtp_asterisk.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c index 5400ef86b..4eabe16d9 100644 --- a/res/res_rtp_asterisk.c +++ b/res/res_rtp_asterisk.c @@ -521,6 +521,11 @@ static void ast_rtp_ice_add_remote_candidate(struct ast_rtp_instance *instance, struct ast_rtp *rtp = ast_rtp_instance_get_data(instance); struct ast_rtp_engine_ice_candidate *remote_candidate; + /* ICE sessions only support UDP candidates */ + if (strcmp(candidate->transport, "UDP")) { + return; + } + if (!rtp->ice_proposed_remote_candidates && !(rtp->ice_proposed_remote_candidates = ao2_container_alloc(1, NULL, ice_candidate_cmp))) { return; |