]> granicus.if.org Git - pdns/commitdiff
auth: speedup AXFR out for presigned zones.
authorKees Monshouwer <mind04@monshouwer.org>
Mon, 30 Apr 2018 19:38:14 +0000 (21:38 +0200)
committermind04 <mind04@monshouwer.org>
Mon, 30 Apr 2018 19:38:14 +0000 (21:38 +0200)
pdns/tcpreceiver.cc

index e1dfd2e55f9650b3939c46e39f972001bf44369a..6374e4ee2c641fb9b57b5e83c7452f4efd9ea8ed 100644 (file)
@@ -811,9 +811,11 @@ int TCPNameserver::doAXFR(const DNSName &target, shared_ptr<DNSPacket> q, int ou
   }
 
   // Group records by name and type, signpipe stumbles over interrupted rrsets
-  sort(zrrs.begin(), zrrs.end(), [](const DNSZoneRecord& a, const DNSZoneRecord& b) {
-    return tie(a.dr.d_name, a.dr.d_type) < tie(b.dr.d_name, b.dr.d_type);
-  });
+  if(!presignedZone) {
+    sort(zrrs.begin(), zrrs.end(), [](const DNSZoneRecord& a, const DNSZoneRecord& b) {
+      return tie(a.dr.d_name, a.dr.d_type) < tie(b.dr.d_name, b.dr.d_type);
+    });
+  }
 
   if(rectify) {
     // set auth