Bug 1259842: allow RFC1918 pairing again r=mjf
authorNils Ohlmeier [:drno] <drno@ohlmeier.org>
Tue, 05 Apr 2016 17:10:03 -0700
changeset 331518 cf48c9ea48e3ee27b0bb1597a768f4c1fc131c75
parent 331517 d06c65a394490475f4d143682deb933baa23d816
child 331519 9d1bbc82b4118733e88352511858b17409929a1f
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmjf
bugs1259842
milestone48.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 1259842: allow RFC1918 pairing again r=mjf MozReview-Commit-ID: 6afbRF64PM2
media/mtransport/test/ice_unittest.cpp
media/mtransport/third_party/nICEr/src/ice/ice_component.c
--- a/media/mtransport/test/ice_unittest.cpp
+++ b/media/mtransport/test/ice_unittest.cpp
@@ -3289,17 +3289,19 @@ TEST_F(WebRtcIceConnectTest, TestPollCan
 
   r = p2_->GetCandidatePairs(0, &pairs);
   ASSERT_EQ(NS_OK, r);
   ASSERT_NE(0U, pairs.size());
   ASSERT_TRUE(p2_->CandidatePairsPriorityDescending(pairs));
   ASSERT_TRUE(ContainsSucceededPair(pairs));
 }
 
-TEST_F(WebRtcIceConnectTest, TestHostCandPairingFilter) {
+// TODO Bug 1259842 - disabled until we find a better way to handle two
+// candidates from different RFC1918 ranges
+TEST_F(WebRtcIceConnectTest, DISABLED_TestHostCandPairingFilter) {
   Init(false, false, false, false);
   AddStream("first", 1);
   ASSERT_TRUE(Gather());
   SetCandidateFilter(IsIpv4Candidate);
 
   int host_net = p1_->GetCandidatesPrivateIpv4Range(0);
   if (host_net <= 0) {
     // TODO bug 1226838: make this work with multiple private IPs
--- a/media/mtransport/third_party/nICEr/src/ice/ice_component.c
+++ b/media/mtransport/third_party/nICEr/src/ice/ice_component.c
@@ -986,36 +986,31 @@ int nr_ice_component_can_candidate_tcpty
     if (left == TCP_TYPE_SO && right != TCP_TYPE_SO)
       return(0);
     if (left == TCP_TYPE_PASSIVE)
       return(0);
 
     return(1);
   }
 
-/* local vs. remote matters here because we allow private -> public pairing,
- * but discourage public -> private pairing. */
+/* filter out pairings which won't work. */
 int nr_ice_component_can_candidate_addr_pair(nr_transport_addr *local, nr_transport_addr *remote)
   {
     int remote_range;
 
     if(local->ip_version != remote->ip_version)
       return(0);
     if(nr_transport_addr_is_link_local(local) !=
        nr_transport_addr_is_link_local(remote))
       return(0);
     /* This prevents our ice_unittest (or broken clients) from pairing a
      * loopback with a host candidate. */
     if(nr_transport_addr_is_loopback(local) !=
        nr_transport_addr_is_loopback(remote))
       return(0);
-    remote_range = nr_transport_addr_get_private_addr_range(remote);
-    if(remote_range && (nr_transport_addr_get_private_addr_range(local) !=
-       remote_range))
-      return(0);
 
     return(1);
   }
 
 int nr_ice_component_pair_candidate(nr_ice_peer_ctx *pctx, nr_ice_component *pcomp, nr_ice_candidate *lcand, int pair_all_remote)
   {
     int r, _status;
     nr_ice_candidate *pcand;