bug 1451750 - treat rrsets from different resolvers as different r=mcmanus
authorDaniel Stenberg <daniel@haxx.se>
Thu, 05 Apr 2018 16:30:10 +0200
changeset 411980 611f45224a280eb4ed4c29f907409303ca199ec2
parent 411979 2be604b3a338474e54a6bbbc2ae58ab8445c3752
child 411981 be2c7141c619d4173b12ee38f8ba1953651e30aa
push id33778
push userapavel@mozilla.com
push dateFri, 06 Apr 2018 09:57:38 +0000
treeherdermozilla-central@46a5fc19bd7a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmcmanus
bugs1451750
milestone61.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 1451750 - treat rrsets from different resolvers as different r=mcmanus ... even if all the addresses are identical. Otherwise the IsTRR() bit would be dropped, resulting in about:networking showing false for this entry while in reality being TRR. Or vice versa. MozReview-Commit-ID: JABLm09iCnn
netwerk/dns/nsHostResolver.cpp
--- a/netwerk/dns/nsHostResolver.cpp
+++ b/netwerk/dns/nsHostResolver.cpp
@@ -1432,16 +1432,20 @@ different_rrset(AddrInfo *rrset1, AddrIn
     if (!rrset1 || !rrset2) {
         return true;
     }
 
     LOG(("different_rrset %s\n", rrset1->mHostName));
     nsTArray<NetAddr> orderedSet1;
     nsTArray<NetAddr> orderedSet2;
 
+    if (rrset1->IsTRR() != rrset2->IsTRR()) {
+        return true;
+    }
+
     for (NetAddrElement *element = rrset1->mAddresses.getFirst();
          element; element = element->getNext()) {
         if (LOG_ENABLED()) {
             char buf[128];
             NetAddrToString(&element->mAddress, buf, 128);
             LOG(("different_rrset add to set 1 %s\n", buf));
         }
         orderedSet1.InsertElementAt(orderedSet1.Length(), element->mAddress);