Bug 1190615 - Skip non-UDP STUN servers for UDP sockets. r=bwc
authorNils Ohlmeier [:drno] <drno@ohlmeier.org>
Mon, 03 Aug 2015 16:26:20 -0700
changeset 287830 48f9d0c0f352af2bf48f87a700236f8a4cfb4ba6
parent 287829 730b6090f696a07452f14a0a7c3dcf91b467ff28
child 287831 bdd09bcecb72a67c0b3be30a17d2cb60fc538101
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbwc
bugs1190615
milestone42.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1190615 - Skip non-UDP STUN servers for UDP sockets. r=bwc CLOSED TREE
media/mtransport/third_party/nICEr/src/ice/ice_component.c
--- a/media/mtransport/third_party/nICEr/src/ice/ice_component.c
+++ b/media/mtransport/third_party/nICEr/src/ice/ice_component.c
@@ -232,16 +232,20 @@ static int nr_ice_component_initialize_u
         ABORT(r);
 
       TAILQ_INSERT_TAIL(&component->candidates,cand,entry_comp);
       component->candidate_ct++;
       cand=0;
 
       /* And a srvrflx candidate for each STUN server */
       for(j=0;j<ctx->stun_server_ct;j++){
+        /* Skip non-UDP */
+        if(ctx->stun_servers[j].transport!=IPPROTO_UDP)
+          continue;
+
         if(r=nr_ice_candidate_create(ctx,component,
           isock,sock,SERVER_REFLEXIVE,0,
           &ctx->stun_servers[j],component->component_id,&cand))
           ABORT(r);
         TAILQ_INSERT_TAIL(&component->candidates,cand,entry_comp);
         component->candidate_ct++;
         cand=0;
       }