]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Continue processing records after OPT in ageDNSPacket() 12672/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 22 Mar 2023 10:04:13 +0000 (11:04 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 22 Mar 2023 10:12:36 +0000 (11:12 +0100)
pdns/dnsparser.cc

index e726ef24e2a66c623ac47b40c200aba69a429351..87356a94271b23d1e335166b085f4681066839f1 100644 (file)
@@ -949,11 +949,11 @@ void ageDNSPacket(char* packet, size_t length, uint32_t seconds, const dnsheader
       /* class */
       dpm.skipBytes(2);
 
-      if (dnstype == QType::OPT) { // not aging that one with a stick
-        break;
+      if (dnstype != QType::OPT) { // not aging that one with a stick
+        dpm.decreaseAndSkip32BitInt(seconds);
+      } else {
+        dpm.skipBytes(4);
       }
-
-      dpm.decreaseAndSkip32BitInt(seconds);
       dpm.skipRData();
     }
   }