From: bert hubert Date: Mon, 5 Sep 2016 09:02:12 +0000 (+0200) Subject: fix case where we did not do duplicate record detection for additional processing X-Git-Tag: dnsdist-1.1.0-beta2~123^2~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=336f11d8c19bdd9be6b3e28ba8be9eb35a0b6515;p=thirdparty%2Fpdns.git fix case where we did not do duplicate record detection for additional processing --- diff --git a/pdns/packethandler.cc b/pdns/packethandler.cc index 8d6fecc581..c4ad19bb5a 100644 --- a/pdns/packethandler.cc +++ b/pdns/packethandler.cc @@ -428,8 +428,10 @@ int PacketHandler::doAdditionalProcessingAndDropAA(DNSPacket *p, DNSPacket *r, c toAdd.push_back(rr); } } - // records.reserve(records.size()+toAdd.size()); - records.insert(records.end(), toAdd.cbegin(), toAdd.cend()); + for(const auto& rec : toAdd) + r->addRecord(rec); + + //records.insert(records.end(), toAdd.cbegin(), toAdd.cend()); // would be faster, but no dedup } return 1; }