From: Renato Alencar Date: Thu, 12 Mar 2026 10:03:59 +0000 (+0100) Subject: Add support to the new WALLET RRType. X-Git-Tag: auth-5.1.0-alpha1^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=da5f290ed36d3cead3e12b93dfbebdf2131a7e10;p=thirdparty%2Fpdns.git Add support to the new WALLET RRType. Signed-off-by: Miod Vallat --- diff --git a/modules/tinydnsbackend/data b/modules/tinydnsbackend/data index b901b72757..a2fca786b4 100644 --- a/modules/tinydnsbackend/data +++ b/modules/tinydnsbackend/data @@ -20134,6 +20134,7 @@ :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 diff --git a/modules/tinydnsbackend/data.cdb b/modules/tinydnsbackend/data.cdb index 5fe831147b..17c0c23b72 100644 Binary files a/modules/tinydnsbackend/data.cdb and b/modules/tinydnsbackend/data.cdb differ diff --git a/pdns/dnsrecords.cc b/pdns/dnsrecords.cc index 503b34fa8f..5902ebd2b6 100644 --- a/pdns/dnsrecords.cc +++ b/pdns/dnsrecords.cc @@ -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); } diff --git a/pdns/dnsrecords.hh b/pdns/dnsrecords.hh index cc467b5a43..87f8d26d4a 100644 --- a/pdns/dnsrecords.hh +++ b/pdns/dnsrecords.hh @@ -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: diff --git a/pdns/qtype.cc b/pdns/qtype.cc index b3e0c85f42..b0c64742a9 100644 --- a/pdns/qtype.cc +++ b/pdns/qtype.cc @@ -95,6 +95,7 @@ const map QType::names = { {"URI", 256}, {"CAA", 257}, {"RESINFO", 261}, + {"WALLET", 262}, {"DLV", 32769}, {"ADDR", 65400}, #if !defined(RECURSOR) diff --git a/pdns/qtype.hh b/pdns/qtype.hh index adfd879fff..57cf409a33 100644 --- a/pdns/qtype.hh +++ b/pdns/qtype.hh @@ -142,6 +142,7 @@ public: URI = 256, CAA = 257, RESINFO = 261, + WALLET = 262, DLV = 32769, ADDR = 65400, #if !defined(RECURSOR) diff --git a/regression-tests.nobackend/tinydns-data-check/expected_result b/regression-tests.nobackend/tinydns-data-check/expected_result index 58b9b2f924..d4e125a791 100644 --- a/regression-tests.nobackend/tinydns-data-check/expected_result +++ b/regression-tests.nobackend/tinydns-data-check/expected_result @@ -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 index 0000000000..1a4b8ccd66 --- /dev/null +++ b/regression-tests/tests/basic-wallet-resolution/command @@ -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 index 0000000000..a17fe55cdb --- /dev/null +++ b/regression-tests/tests/basic-wallet-resolution/description @@ -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 index 0000000000..28d8b7b9bc --- /dev/null +++ b/regression-tests/tests/basic-wallet-resolution/expected_result @@ -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 index 0000000000..e69de29bb2 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 index 0000000000..e69de29bb2 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 index 0000000000..e69de29bb2 diff --git a/regression-tests/tests/cname-wildcard-chain/expected_result.dnssec b/regression-tests/tests/cname-wildcard-chain/expected_result.dnssec index fbdf334ebb..8cb26c117a 100644 --- a/regression-tests/tests/cname-wildcard-chain/expected_result.dnssec +++ b/regression-tests/tests/cname-wildcard-chain/expected_result.dnssec @@ -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 diff --git a/regression-tests/zones/example.com b/regression-tests/zones/example.com index f4f13ae300..810a4c7413 100644 --- a/regression-tests/zones/example.com +++ b/regression-tests/zones/example.com @@ -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"