]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Add support to the new WALLET RRType.
authorRenato Alencar <renatoalencar.73@gmail.com>
Thu, 12 Mar 2026 10:03:59 +0000 (11:03 +0100)
committerMiod Vallat <miod.vallat@powerdns.com>
Thu, 12 Mar 2026 14:58:47 +0000 (15:58 +0100)
Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
15 files changed:
modules/tinydnsbackend/data
modules/tinydnsbackend/data.cdb
pdns/dnsrecords.cc
pdns/dnsrecords.hh
pdns/qtype.cc
pdns/qtype.hh
regression-tests.nobackend/tinydns-data-check/expected_result
regression-tests/tests/basic-wallet-resolution/command [new file with mode: 0755]
regression-tests/tests/basic-wallet-resolution/description [new file with mode: 0644]
regression-tests/tests/basic-wallet-resolution/expected_result [new file with mode: 0644]
regression-tests/tests/basic-wallet-resolution/skip.ldap-simple [new file with mode: 0644]
regression-tests/tests/basic-wallet-resolution/skip.ldap-strict [new file with mode: 0644]
regression-tests/tests/basic-wallet-resolution/skip.ldap-tree [new file with mode: 0644]
regression-tests/tests/cname-wildcard-chain/expected_result.dnssec
regression-tests/zones/example.com

index b901b72757edee79e41533588f886c840d9171f3..a2fca786b431acf973bef2c55aade06241323939 100644 (file)
 :phil.mb.example.com:7:\002pc\303\343:120
 :philip.mb.example.com:9:\303\362:120
 :sheila.mb.example.com:7:\004bill\303\343:120
+:test.wallet.example.com:262:\023currency-identifier\021wallet-identifier:120
 :text.example.com:16:\025Hi\054\040this\040is\040some\040text:120
 :text0.example.com:16:\014k\075rsa\073\040p\075one:120
 :text1.example.com:16:\014k\075rsa\073\040p\075one:120
index 5fe831147baf90a72ab8d6bd93bdc55d2df1a416..17c0c23b72aa1c8c15a2ec66ec1da845dea971d5 100644 (file)
Binary files a/modules/tinydnsbackend/data.cdb and b/modules/tinydnsbackend/data.cdb differ
index 503b34fa8f9bdc6b24bb8e32832ae5d23a0a31ce..5902ebd2b67ef9fb3b6261bfaa9a0f83a092461d 100644 (file)
@@ -176,6 +176,10 @@ boilerplate_conv(OPT,
                  );
 //NOLINTEND
 
+// NOLINTBEGIN
+boilerplate_conv(WALLET, conv.xfrText(d_text, true));
+// NOLINTEND
+
 #ifdef HAVE_LUA_RECORDS
 
 bool g_luaRecordInsertWhitespace;
@@ -1017,6 +1021,7 @@ static void reportOtherTypes(const ReportIsOnlyCallableByReportAllTypes& guard)
    L32RecordContent::report(guard);
    L64RecordContent::report(guard);
    LPRecordContent::report(guard);
+   WALLETRecordContent::report(guard);
    ZONEMDRecordContent::report(guard);
 }
 
index cc467b5a43bd9696c684a0ffc2eac523531e253c..87f8d26d4adb039f009dabca39cbfb71ddc4dcbe 100644 (file)
@@ -1139,6 +1139,20 @@ private:
   DNSName d_fqdn;
 };
 
+class WALLETRecordContent : public DNSRecordContent
+{
+public:
+  includeboilerplate(WALLET)
+
+  [[nodiscard]] size_t sizeEstimate() const override
+  {
+    return sizeof(*this) + d_text.size();
+  }
+
+  string d_text;
+};
+
+
 class EUI48RecordContent : public DNSRecordContent
 {
 public:
index b3e0c85f42d9112de2369435253b0d292c4a1380..b0c64742a9485703ed7202cc399c8cd0241150d1 100644 (file)
@@ -95,6 +95,7 @@ const map<const string, uint16_t> QType::names = {
   {"URI", 256},
   {"CAA", 257},
   {"RESINFO", 261},
+  {"WALLET", 262},
   {"DLV", 32769},
   {"ADDR", 65400},
 #if !defined(RECURSOR)
index adfd879fff358a40f74bb11cbd84caada3342cef..57cf409a33d4cc9cb03dc6cc347327cb9577d16e 100644 (file)
@@ -142,6 +142,7 @@ public:
     URI = 256,
     CAA = 257,
     RESINFO = 261,
+    WALLET = 262,
     DLV = 32769,
     ADDR = 65400,
 #if !defined(RECURSOR)
index 58b9b2f92406f46e9b5f5b8cacbb60e720412bcc..d4e125a79192dcc7e40f39c3eb7897d44b19cc5b 100644 (file)
@@ -1,4 +1,4 @@
-196ff1338193d25caf18c4ad61620ed7  ../regression-tests/zones/example.com
+46d06f67cb9597003fb060d051feb907  ../regression-tests/zones/example.com
 5cce94d1d050925d3bb8c5271a10961b  ../regression-tests/zones/test.com
 e5e3ee998d151fe194b98997eaa36c53  ../regression-tests/zones/test.dyndns
 dee3e8b568549d9450134b555ca73990  ../regression-tests/zones/sub.test.dyndns
@@ -15,5 +15,5 @@ a98864b315f16bcf49ce577426063c42  ../regression-tests/zones/cdnskey-cds-test.com
 9aeed2c26d0c3ba3baf22dfa9568c451  ../regression-tests/zones/2.0.192.in-addr.arpa
 99c73e8b5db5781fec1ac3fa6a2662a9  ../regression-tests/zones/cryptokeys.org
 1f9e19be0cff67330f3a0a5347654f91  ../regression-tests/zones/hiddencryptokeys.org
-c0c013171adc9e838fe0263150205406  ../modules/tinydnsbackend/data
-979d7e1b1f025ce8964dc29f76723232  ../modules/tinydnsbackend/data.cdb
+c0c62775abc8045753fd0012c0dd00de  ../modules/tinydnsbackend/data
+c693b7034e64bcd18a53b88b1e8d1e9f  ../modules/tinydnsbackend/data.cdb
diff --git a/regression-tests/tests/basic-wallet-resolution/command b/regression-tests/tests/basic-wallet-resolution/command
new file mode 100755 (executable)
index 0000000..1a4b8cc
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/sh
+cleandig test.wallet.example.com WALLET
diff --git a/regression-tests/tests/basic-wallet-resolution/description b/regression-tests/tests/basic-wallet-resolution/description
new file mode 100644 (file)
index 0000000..a17fe55
--- /dev/null
@@ -0,0 +1 @@
+This test tries to resolve the new WALLET RRType.
diff --git a/regression-tests/tests/basic-wallet-resolution/expected_result b/regression-tests/tests/basic-wallet-resolution/expected_result
new file mode 100644 (file)
index 0000000..28d8b7b
--- /dev/null
@@ -0,0 +1,3 @@
+0      test.wallet.example.com.        120     IN      WALLET  "currency-identifier" "wallet-identifier"
+Rcode: 0 (No Error), RD: 0, QR: 1, TC: 0, AA: 1, opcode: 0
+Reply to question for qname='test.wallet.example.com.', qtype=WALLET
diff --git a/regression-tests/tests/basic-wallet-resolution/skip.ldap-simple b/regression-tests/tests/basic-wallet-resolution/skip.ldap-simple
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/regression-tests/tests/basic-wallet-resolution/skip.ldap-strict b/regression-tests/tests/basic-wallet-resolution/skip.ldap-strict
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/regression-tests/tests/basic-wallet-resolution/skip.ldap-tree b/regression-tests/tests/basic-wallet-resolution/skip.ldap-tree
new file mode 100644 (file)
index 0000000..e69de29
index fbdf334ebb5377007d6181e4b9e01edfad7ba3b5..8cb26c117a4aa034e8475417a0844c3a369ec433 100644 (file)
@@ -18,7 +18,7 @@
 1      *.w3.example.com.       86400   IN      RRSIG   NSEC 13 3 86400 [expiry] [inception] [keytag] example.com. ...
 1      *.w4.example.com.       86400   IN      NSEC    *.w5.example.com. CNAME RRSIG NSEC
 1      *.w4.example.com.       86400   IN      RRSIG   NSEC 13 3 86400 [expiry] [inception] [keytag] example.com. ...
-1      *.w5.example.com.       86400   IN      NSEC    www.example.com. A RRSIG NSEC
+1      *.w5.example.com.       86400   IN      NSEC    test.wallet.example.com. A RRSIG NSEC
 1      *.w5.example.com.       86400   IN      RRSIG   NSEC 13 3 86400 [expiry] [inception] [keytag] example.com. ...
 2      .       32768   IN      OPT     
 Rcode: 0 (No Error), RD: 0, QR: 1, TC: 0, AA: 1, opcode: 0
index f4f13ae3004bb2f4b3df32cae0fa6f666cb7e6c2..810a4c74139c65aea1ae29fabb8e45e24d16535c 100644 (file)
@@ -20230,3 +20230,5 @@ bar.svcb IN AAAA 2001:db8::3:4
 bar.svcb IN A 192.0.2.1
 
 baz.svcb IN SVCB 0 foo1.svcb.example.net. ; AliasMode - should not trigger additional processing, the target is in another zone
+
+test.wallet     IN WALLET "currency-identifier" "wallet-identifier"