From: Kees Monshouwer Date: Thu, 23 Feb 2017 23:36:15 +0000 (+0100) Subject: fix a regression in axfr-rectify introduced by commit d86e1bf7 X-Git-Tag: auth-4.0.4-rc1~3^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=af6751eb4b914e3fc756d0b01f1b4ea0d629d936;p=thirdparty%2Fpdns.git fix a regression in axfr-rectify introduced by commit d86e1bf7 --- diff --git a/pdns/tcpreceiver.cc b/pdns/tcpreceiver.cc index a8088e318a..e588eabd64 100644 --- a/pdns/tcpreceiver.cc +++ b/pdns/tcpreceiver.cc @@ -767,9 +767,7 @@ int TCPNameserver::doAXFR(const DNSName &target, shared_ptr q, int ou rr.content = ip.content; rrs.push_back(rr); } - } - else { - rrs.push_back(rr); + continue; } if (rectify) { @@ -782,6 +780,7 @@ int TCPNameserver::doAXFR(const DNSName &target, shared_ptr q, int ou continue; } } + rrs.push_back(rr); } else { if (rr.qtype.getCode()) L< 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); + sort(rrs.begin(), rrs.end(), [](const DNSResourceRecord& a, const DNSResourceRecord& b) { + return tie(a.qname, a.qtype) < tie(b.qname, b.qtype); }); if(rectify) {