bug 1486137 - TRR: fix the FAMILY field in the ECS code r=mcmanus
☠☠ backed out by a360d3279b9f ☠ ☠
authorDaniel Stenberg <daniel@haxx.se>
Mon, 27 Aug 2018 16:03:30 +0000
changeset 491284 0192efea1b664db8d20a691401ec5d3f9d3a2122
parent 491283 3bf4771b88cba6f70e0192f15637ce7f9eadc64d
child 491285 9dc25841ff4f96a31bb150fee517a589c02aa7c6
push id1815
push userffxbld-merge
push dateMon, 15 Oct 2018 10:40:45 +0000
treeherdermozilla-release@18d4c09e9378 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmcmanus
bugs1486137
milestone63.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 1486137 - TRR: fix the FAMILY field in the ECS code r=mcmanus ... since AF_INET wouldn't actually use IPv4! MozReview-Commit-ID: FCf7psawENI Differential Revision: https://phabricator.services.mozilla.com/D4328
netwerk/dns/TRR.cpp
--- a/netwerk/dns/TRR.cpp
+++ b/netwerk/dns/TRR.cpp
@@ -134,18 +134,19 @@ TRR::DohEncode(nsCString &aBody, bool aD
     // The RDATA is just the ECS option setting zero subnet prefix
 
     aBody += '\0'; // upper 8 bit OPTION-CODE ECS
     aBody += 8;    // OPTION-CODE, 2 octets, for ECS is 8
 
     aBody += '\0'; // upper 8 bit OPTION-LENGTH
     aBody += 4;    // OPTION-LENGTH, 2 octets, contains the length of the payload
                    // after OPTION-LENGTH
-    aBody += '\0'; // upper 8 bit FAMILY
-    aBody += AF_INET; // FAMILY, 2 octets
+    aBody += '\0'; // upper 8 bit FAMILY. IANA Address Family Numbers registry, not the
+                   // AF_* constants!
+    aBody += 1;    // FAMILY (Ipv4), 2 octets
 
     aBody += '\0'; // SOURCE PREFIX-LENGTH      |     SCOPE PREFIX-LENGTH       |
     aBody += '\0';
 
     // ADDRESS, minimum number of octets == nothing because zero bits
   }
   return NS_OK;
 }