]> granicus.if.org Git - pdns/commitdiff
improve truncating behaviour: don't truncate because of additional records. See http...
authorBert Hubert <bert.hubert@netherlabs.nl>
Sat, 25 Mar 2006 10:53:32 +0000 (10:53 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Sat, 25 Mar 2006 10:53:32 +0000 (10:53 +0000)
Thanks to Alan Hodgson for reporting this

git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@616 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/pdns_recursor.cc

index d796c4b9b1f28c6b3540a79fd756aa6e1cd99c93..0038dd75dc99bd5b5748c729fb12856a1db7163a 100644 (file)
@@ -304,7 +304,8 @@ void startDoResolve(void *p)
          drc->toPacket(pw);
          if(!dc->d_tcp && pw.size() > maxudpsize) {
            pw.rollback();
-           pw.getHeader()->tc=1;
+           if(i->d_place==DNSResourceRecord::ANSWER)  // only truncate if we actually omitted parts of the answer
+             pw.getHeader()->tc=1;
            goto sendit; // need to jump over pw.commit
          }
        }