]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Adapt test to not use repeating records
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 23 Jul 2024 14:26:08 +0000 (16:26 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 16 Dec 2024 10:28:53 +0000 (11:28 +0100)
regression-tests.recursor-dnssec/test_EDNSBufferSize.py

index e9b4ccb4aa4f00e42ed5c197506c16e61bd95bd7..34c31d4b45baa41b7b7713ecd01f219eaf4ad20e 100644 (file)
@@ -253,17 +253,19 @@ class UDPLargeResponder(DatagramProtocol):
         # We pretend to do EDNS with a 4096 buffer size
         response.use_edns(payload=4096)
 
-        # What we use to fill the TXT records
-        # Test number + 64, so 01 = 'A', 02 = 'B' etc...
-        value = chr(testnum + 64)
-
         # Each pre-RDATA answer RR is 12 bytes
         # NAME:  2 (ptr to begin of packet, 0xC00C)
         # TYPE:  2
         # CLASS: 2
         # TTL:   4
         # RDLEN: 2
+        loop = 0
         while packet_size > 0:
+            # What we use to fill the TXT records
+            # Test number + 64 + loop iteration, so 01 = 'A', 02 = 'B' etc...
+            # We take the loop iteration to not generate duplicate records
+            value = chr(testnum + 64 + loop)
+            loop += 1
             # Remove the pre-RDATA length
             packet_size -= 12
             # And the TXT size indicator (first byte in the TXT record)