Skip to content

Commit 0cb9f5f

Browse files
authored
Merge pull request #16977 from miodvallat/wallet-rrtype
auth: Add support to the new WALLET RRType
2 parents 2c874cd + a196ab7 commit 0cb9f5f

17 files changed

Lines changed: 36 additions & 5 deletions

File tree

docs/appendices/types.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,7 @@ The following, rarely used or obsolete record types, are also supported:
393393
- MR (:rfc:`1035`)
394394
- NID (:rfc:`6742`)
395395
- RKEY (`draft-reid-dnsext-rkey-00.txt <https://tools.ietf.org/html/draft-reid-dnsext-rkey-00>`__)
396+
- WALLET (`wallet-completed-template <https://www.iana.org/assignments/dns-parameters/WALLET/wallet-completed-template>`__)
396397

397398
.. _types-unknown:
398399

modules/tinydnsbackend/data

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20134,6 +20134,7 @@
2013420134
:phil.mb.example.com:7:\002pc\303\343:120
2013520135
:philip.mb.example.com:9:\303\362:120
2013620136
:sheila.mb.example.com:7:\004bill\303\343:120
20137+
:test.wallet.example.com:262:\023currency-identifier\021wallet-identifier:120
2013720138
:text.example.com:16:\025Hi\054\040this\040is\040some\040text:120
2013820139
:text0.example.com:16:\014k\075rsa\073\040p\075one:120
2013920140
:text1.example.com:16:\014k\075rsa\073\040p\075one:120

modules/tinydnsbackend/data.cdb

102 Bytes
Binary file not shown.

modules/tinydnsbackend/generate-data.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ done
2323

2424
# CD to regression test because named.conf has relative paths.
2525
cd ../../regression-tests
26-
../pdns/pdns_server --daemon=no --local-port=5300 --socket-dir=./ \
26+
${PDNS_BUILD_PATH:-../pdns}/pdns_server --daemon=no --local-port=5300 --socket-dir=./ \
2727
--no-shuffle --launch=bind --bind-config=../regression-tests/named.conf \
2828
--query-logging --loglevel=0 \
2929
--cache-ttl=0 --no-config --local-address=127.0.0.1 \

pdns/dnsrecords.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,10 @@ boilerplate_conv(OPT,
176176
);
177177
//NOLINTEND
178178

179+
// NOLINTBEGIN
180+
boilerplate_conv(WALLET, conv.xfrText(d_text, true));
181+
// NOLINTEND
182+
179183
#ifdef HAVE_LUA_RECORDS
180184

181185
bool g_luaRecordInsertWhitespace;
@@ -1017,6 +1021,7 @@ static void reportOtherTypes(const ReportIsOnlyCallableByReportAllTypes& guard)
10171021
L32RecordContent::report(guard);
10181022
L64RecordContent::report(guard);
10191023
LPRecordContent::report(guard);
1024+
WALLETRecordContent::report(guard);
10201025
ZONEMDRecordContent::report(guard);
10211026
}
10221027

pdns/dnsrecords.hh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1139,6 +1139,20 @@ private:
11391139
DNSName d_fqdn;
11401140
};
11411141

1142+
class WALLETRecordContent : public DNSRecordContent
1143+
{
1144+
public:
1145+
includeboilerplate(WALLET)
1146+
1147+
[[nodiscard]] size_t sizeEstimate() const override
1148+
{
1149+
return sizeof(*this) + d_text.size();
1150+
}
1151+
1152+
string d_text;
1153+
};
1154+
1155+
11421156
class EUI48RecordContent : public DNSRecordContent
11431157
{
11441158
public:

pdns/qtype.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ const map<const string, uint16_t> QType::names = {
9595
{"URI", 256},
9696
{"CAA", 257},
9797
{"RESINFO", 261},
98+
{"WALLET", 262},
9899
{"DLV", 32769},
99100
{"ADDR", 65400},
100101
#if !defined(RECURSOR)

pdns/qtype.hh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ public:
142142
URI = 256,
143143
CAA = 257,
144144
RESINFO = 261,
145+
WALLET = 262,
145146
DLV = 32769,
146147
ADDR = 65400,
147148
#if !defined(RECURSOR)

regression-tests.nobackend/tinydns-data-check/expected_result

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
196ff1338193d25caf18c4ad61620ed7 ../regression-tests/zones/example.com
1+
46d06f67cb9597003fb060d051feb907 ../regression-tests/zones/example.com
22
5cce94d1d050925d3bb8c5271a10961b ../regression-tests/zones/test.com
33
e5e3ee998d151fe194b98997eaa36c53 ../regression-tests/zones/test.dyndns
44
dee3e8b568549d9450134b555ca73990 ../regression-tests/zones/sub.test.dyndns
@@ -15,5 +15,5 @@ a98864b315f16bcf49ce577426063c42 ../regression-tests/zones/cdnskey-cds-test.com
1515
9aeed2c26d0c3ba3baf22dfa9568c451 ../regression-tests/zones/2.0.192.in-addr.arpa
1616
99c73e8b5db5781fec1ac3fa6a2662a9 ../regression-tests/zones/cryptokeys.org
1717
1f9e19be0cff67330f3a0a5347654f91 ../regression-tests/zones/hiddencryptokeys.org
18-
c0c013171adc9e838fe0263150205406 ../modules/tinydnsbackend/data
19-
979d7e1b1f025ce8964dc29f76723232 ../modules/tinydnsbackend/data.cdb
18+
c0c62775abc8045753fd0012c0dd00de ../modules/tinydnsbackend/data
19+
c693b7034e64bcd18a53b88b1e8d1e9f ../modules/tinydnsbackend/data.cdb
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
cleandig test.wallet.example.com WALLET

0 commit comments

Comments
 (0)