]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Add more createReverse/createReverse6 error tests. 16683/head
authorMiod Vallat <miod.vallat@powerdns.com>
Thu, 18 Dec 2025 09:26:18 +0000 (10:26 +0100)
committerMiod Vallat <miod.vallat@powerdns.com>
Mon, 29 Dec 2025 09:40:07 +0000 (10:40 +0100)
Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
(cherry picked from commit d6502a4004875e32d4d8233b00634598f3b5a8ec)

regression-tests.auth-py/test_LuaRecords.py

index c59e639708f5cf6b69e206b428c07b8d489789ad..c85fe13423ee3fe73feb19162dc9802c5ee05bb0 100644 (file)
@@ -1091,7 +1091,9 @@ class TestLuaRecords(BaseLuaTest):
             }),
             ".createreverse.example.org." : (dns.rdatatype.PTR, {
                 "4.3.2.1": "1-2-3-4.example.com.",
-                "10.10.10.10": "quad10.example.com."   # exception
+                "10.10.10.10": "quad10.example.com.",  # exception
+                # error: values not in the 0..255 range
+                "256.384.512.640": "error."
             }),
             ".createforward6.example.org." : (dns.rdatatype.AAAA, {
                 "2001--db8" : "2001::db8",
@@ -1102,7 +1104,11 @@ class TestLuaRecords(BaseLuaTest):
             }),
             ".createreverse6.example.org." : (dns.rdatatype.PTR, {
                 "8.b.d.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.1.0.0.2" : "2001--db8.example.com.",
-                "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2" : "example.example.com."   # exception
+                "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2" : "example.example.com.",   # exception
+                # error: fewer than 32 labels (including ".createreverse6.example.org.")
+                "8.b.d.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.1.0.0.2" : "unknown.",
+                # error: I and O instead of 1 and 0 in the would-be address
+                "O.0.0.0.0.0.0.0.0.0.0.0.0.0.0.1.0.b.c.A.2.F.E.9.C.0.0.3.0.0.2.I" : "error."
             })
         }