Changelog
View SourceAll notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
main
v13.0.0
This release moves to dns_erlang 6, replaces zone codecs with zone pipes, and answers ANY, EDNS and DNSSEC queries closer to their RFCs, with breaking changes throughout.
Upgrading from 12.x
- Replace
dnssec:withdns_sec:in code that calls dns_erlang, and follow its 6.0.0 migration guide for DNSSEC keys. The zones that dns_erlang 6 refuses are listed under Changed. - In a custom packet pipeline, replace
erldns_edns_max_payload_sizewitherldns_edns, first. Every dependency a pipe declares is now checked, so a pipeline that started on 12.x can fail to, with anunsatisfied_dependencyerror that names the pipe and what it requires. - Pipes that read the query's EDNS options find them in the
query_edns_optionspipeline option, and add the response's witherldns_edns:add_option/2. - Move the
codecsof thezonesconfiguration to itspipelinekey, as zone pipes aftererldns_zone_standard(seeerldns_zone_pipeline), and callerldns_zoneswhere you callederldns_zone_codec. - Recompile code that matches on
#zone{}, which has a newoptsfield. - Answers from signed zones no longer set AD:
{dnssec, #{authenticated_data => true}}sets it again. ANY over UDP is answered minimally:{minimal_any, #{udp => false}}answers it in full.
Added
- A pipe's
deps/0can list a dependency as{optional, Module}: it need not be in the pipeline, but must be in its place when it is. erldns_edns_nsididentifies the server to clients that ask, with NSID (RFC 5001) and theid.serverandhostname.bindCH TXT queries (RFC 4892), once{edns_nsid, #{id => Id}}is set (#390).erldns_zone_cache:put_rrset_sync_counter/4sets an RRSet's sync counter to any value, even a lower one, without touching its records.- The
pipelinekey of thezonesconfiguration lists the pipes the records of a zone go through when it is decoded, seeerldns_zone_pipeline. A pipe'sdecode_record/3gets each record, one after the other, both as it was given in JSON, keys erldns doesn't use included, and as the pipes before it left it, and can keep in the options what itsdecode/2needs;decode/2gets all the records at once, after everydecode_record/3.erldns_zone_contextanderldns_zone_standardare the built-in pipes. - A zone pipe can implement
encode/1to encode the records of a custom type back to JSON, aserldns_zones:encode/1,2and the admin API do. erldns_zones:decode/2decodes a zone asdecode/1does, with options for the pipes of the zone pipeline, anderldns_zones:decode_records/2decodes part of a zone, such as an RRSet, withscopepartial.- DNSSEC: zones can be signed with ML-DSA-44 keys, algorithm 18 (draft-westerbaan-dnssec-mldsa-04),
where
cryptohas it (OTP 28.1+ built against OpenSSL 3.5+).
Fixed
- The packet cache no longer caches SERVFAIL or other errors, only NOERROR and NXDOMAIN (#393).
- The packet cache now hits answers with additional records, such as glue for NS and MX targets.
- The packet cache ignores the case of names, and a hit answers with the request's question, ID and RD bit (#391).
erldns_pipelinenow checks every dependency a pipe declares, where it only checked the last of each list. A pipeline that used to start can now fail to, for example withouterldns_sorteraftererldns_resolver, or withouterldns_questionsbeforeerldns_dnssec.- A pipe placed between the two
erldns_packet_cacheappearances no longer passes for coming before the cache: a pipe is placed by its first appearance, and its dependents may not appear before it at all. - Responses no longer send back the EDNS options of the query, such as an empty NSID or the client's cookie, nor its extended RCODE (#389).
- Responses no longer send back other records the query carries in its additional section, and REFUSED answers no longer send back its answer and authority sections.
- A query with an EDNS version above 0 gets BADVERS and nothing else, as RFC 6891 §6.1.3 requires, instead of an answer with BADVERS.
- A TCP or TLS client that disconnects right after connecting, or during the TLS handshake, no
longer causes a
connection_init_failederror log and[erldns, request, error]event. - ANY at a name matched by a wildcard CNAME is answered with the CNAME, as at a name that owns one, instead of following it and answering with every record at its target.
- A zone record that isn't a JSON object no longer fails the decode of its zone when
context_optionsis set: it is dropped with anunsupported_recordwarning, as it already was without them. - A record whose
contextisnullis served as one without a context, where it failed the decode of its zone whencontext_optionswas set. - A DNSSEC keyset that misses a key fails its zone with
{invalid_keyset, MissingKeys}, instead of abadkeyerror whose logged stacktrace held the keyset and its private keys. - A DNSSEC key of a type erldns doesn't sign with, or that doesn't parse,
keysthat aren't a list, and a JSON zone withoutnameorrecordsfail with{unsupported_key, Type},invalid_key,invalid_keysetsand{invalid_zone, Fields}, without the private keys in the error or its logged stacktrace. - The additional section only holds the addresses of NS and MX targets at or below the apex of the zone that answers. It held those of any target another zone in the cache had records for, so a zone's answers carried the records of whichever zone held the names of its nameservers and mail exchangers, a zone in other hands included.
Changed
erldns_packet_cacherequireserldns_questionsearlier in the pipeline.- Answers from signed zones no longer set AD, as RFC 4035 §3.1.6 requires unless explicitly
configured;
{dnssec, #{authenticated_data => true}}sets it again (#394). erldns_ednsreplaceserldns_edns_max_payload_sizeand goes first in the pipeline: a pipeline witherldns_questionsbefore it fails to start.erldns_ednsmoves the query's EDNS options to thequery_edns_optionspipeline option, a map from option code to option, and pipes add the response's witherldns_edns:add_option/2.erldns_resolveranderldns_packet_cacherequireerldns_edns.- Queries that only differ by their EDNS options, such as each client's cookie, share packet cache entries.
erldns_edns_ederequireserldns_edns, and no longer adds an OPT RR to the response of a query that had none, as RFC 6891 §7 forbids.- ANY over UDP is answered as RFC 8482 describes, with
HINFO "RFC8482" "", signed when the query sets DO, and Extended DNS Error 21, instead of every record at the name. A CNAME or HINFO RRset at the name still answers.{minimal_any, #{udp => false}}turns this off,tcp => trueturns it on over TCP, andhinfo_ttlsets the HINFO's TTL, 3600 by default (#395). - The packet cache keeps answers to ANY apart by transport.
erldns_query_throttleno longer throttles ANY, now answered minimally over UDP, only RRSIG queries.context_optionsis read when theerldns_zonessupervisor starts, and no longer on each zone decode. Anallowthat isn't a list now fails that start, where it only failed the decode of the zones with a record that has a context, and so does acontext_optionsthat isn't a map, where it was ignored.- The records of zone files go through the zone pipeline, so its pipes see them, and duplicate records are dropped.
#zone{}has a newoptsfield, a map of per-zone settings (erldns:zone_opts()), empty by default, so code matching on it needs recompiling. RRSet changes keep a zone's opts.- erldns requires dns_erlang 6, which renames
dnssectodns_secand keeps thepublic_keyof a DNSKEY or CDNSKEY as its RDATA's key field, a binary, where the RSA keys of loaded zones were[E, M]. - With dns_erlang 6, an SVCB or HTTPS record with
no-default-alpnand noalpnfails its zone (RFC 9460 §7.1.1), a DNSKEY or CDNSKEY whose RSA or DSA key the RFCs rule out is dropped, and$INCLUDEin a zone file reads only files at or under the zone file's directory. - With dns_erlang 6, a number that starts a zone file line is the record's owner (RFC 1035 §5.1),
as in reverse zones:
1 IN PTR host.was a PTR at the owner before it, with a TTL of 1. - With dns_erlang 6, a keyset whose
valid_untilis before itsinception, or 2^31 seconds or more after it (RFC 4034 §3.1.5), or whose RSA key's size the RFCs rule out, fails to store its zone, where it signed RRSIGs that resolvers refuse.
Updated
- RSA keys sign with the CRT's numbers, as bytes: an A record signs in 129 µs instead of 233 µs with a 1024-bit key, and in 257 µs instead of 482 µs with a 1280-bit key, allocating half as much (#408).
- dns_erlang 6: UDP replies of up to three records that fit whole encode 1.1–1.3x faster, DNSKEY
answers with an RSA key encode 1.6x faster with 1.2x less memory,
dns_domain:to_lower/1, run on every query name, is 2.1–3.6x faster, and zone files parse 2.37–8.93x faster with 4.51–10.16x less memory on large zones.
Removed
erldns_zone_codec: itsbuild_zone/4,decode/1andencode/1,2move toerldns_zones, and itsdecode_record/1is replaced byerldns_zones:decode_records/2.- Zone codecs: the
codecskey of thezonesconfiguration, theerldns_zone_codecbehaviour and itsencoder()anddecoder()types, andregister_codec/1,register_codecs/1andlist_codecs/0. A pipe in thepipelinekey, aftererldns_zone_standard, decodes the records of a custom type with itsdecode_record/3, and encodes them back with itsencode/1. A configuration that still setscodecs, or that lists a codec inpipeline, fails to start.
v12.0.3
Fixed
erldns:stop_listeners/0also terminates suspended queries.
Changed
erldns_listeners:reset_queues/0also empties the async pool queue.
Updated
- dns_erlang 5.1.2: ECDSA RRSIGs (algorithms 13 and 14) now validate with other resolvers.
v12.0.2
Updated
- dns_erlang updated with performance improvements
- Fixed a documentation typo for suspending pipelines
v12.0.1
Fixed
- Discarding or committing again a zone that was since replaced no longer deletes its records before the grace period has passed, while queries may still be reading them.
Updated
- Some performance improvements at zone lookups (#379, #380)
v12.0.0
Changed
- Replacing a zone is atomic: a query sees the old zone or the new one, never one with records
missing. The replaced records are deleted after the new
zones.grace_period(30 seconds by default), as are a deleted zone's. #zone{}has a newgenfield, so code matching on it needs recompiling. Lookups need a header read from the cache: one built by the caller finds no records.- Replacing a zone keeps its rrset sync counters; only
delete_zone/1clears them.
Added
stage_zone/1andcommit_zone/1, which splitput_zone/1, withdiscard_zone/1,stage_zone_rrset/4andstage_zone_rrset_deletion/3to handle a staged zone. A staged zone is dropped if the process that staged it exits before settling it.
Fixed
put_zone_rrset/4takes the RRSIGs it keeps from the zone it writes to, not from a child zone whose apex is the record's name.
v11.4.0
Added
- The pipeline async pool emits
[erldns, pipeline, resume]when it finishes a suspended continuation, pairing the[erldns, pipeline, suspend]it emits on accepting one. Both are now documented.
v11.3.2
Fixed
- The pipeline async pool no longer kills a worker that overruns. The kill also discarded whatever that worker had queued in its mailbox, reporting none of it. Overruns are still reported as warnings.
v11.3.1
Fixed
- The pipeline async pool reports the continuations it sheds.
[erldns, request, dropped]carried no metadata at all, so consumers matching on it never saw a pool drop, and nothing was logged either. It now carrieswhat => async_work_droppedwith the query's transport and sojourn time, and logs a notice, as the listeners do. - The UDP listener's overrun handler passes wpool's report to
[erldns, request, timeout]instead of dropping it.
v11.3.0
Fixed
- Referrals carry the delegation's DS RRset and its RRSIG, or an NSEC at the delegation name proving there is none (RFC 4035 §3.1.4). The NSEC was synthesized at the QNAME from whatever the parent stored below the cut, and the DS was never included.
- The resolver decides a referral before reading the records at a name, at the topmost cut, and
passes the delegation to the DNSSEC pipe as the
zonecutopt; the shape of the response and the request's own authority section no longer take part. A DS query below a cut is a referral, one for the delegation name itself is answered by the parent. - Delegation NS RRsets, glue, and records occluded by a cut are no longer signed (RFC 4035 §2.2), and the NSEC at a delegation name is owned by its lowercased form and advertises only NS, DS, RRSIG and NSEC (RFC 4034 §4.1.2).
- DS RRsets are signed with the zone signing key on every path.
- Errors from the resolver are no longer completed into a signed NOERROR denial with AD set.
v11.2.4
Fixed
- Negative answers carry the SOA in the authority section, and the RRSIG covering it, at the minimum of the SOA TTL and the SOA MINIMUM field, as RFC 2308 §3 requires.
v11.2.3
Changed
- Minimum supported Erlang/OTP is now 28, as required by
worker_pool7.
v11.2.2
Updated
- Upgrade dependencies
v11.2.1
Changed
- A zone half made of custom types decodes ~70x faster, one almost entirely made of them ~200x; zones of standard types are unaffected.
v11.2.0
Added
erldns:stop_listeners/0closes the listener sockets on request, the mirror oferldns:start_listeners/0.
v11.1.1
Fixed
- Compact denial of existence no longer fails for query names at the 255-octet ceiling, implementing the successor ladder of RFC 4471 §3.1.2.
- Pipeline exception logs now report the reason under
reason, as every other exception log in the library and as theerldns_pipelinedocs already stated, rather than undererror.
v11.1.0
Fixed
- Listeners and the admin endpoint now adjust their socket options and socket counts to the host platform, ensuring portability to many BSD variants, Windows, and MacOS. (#358).
v11.0.2
Fixed
- The OPT RR is now found anywhere in the additional section (RFC 6891 §6.1.1), not only at its head.
- Upgrade dns_erlang to
v5.0.14
v11.0.1
Fixed
- Added the DNS binary payload to logs when the UDP decode crashes
v11.0.0
Added
- DNSSEC NSEC type-mapper extension API on
erldns_dnssec:add_nsec_type_mapper/3lets a pipeline stage register, from itsprepare/1, how a custom record type widens the NSEC type bitmap (e.g. ALIAS → A).
Removed
- Removed the
erldns_handlermodule and thepacket_handlersextension mechanism. Migrate handlers toerldns_pipelineand NSEC mappers toerldns_dnssec:add_nsec_type_mapper/3.
v10.6.0
Added
autostart_listenersapplication environment (defaulttrue) anderldns:start_listeners/0.
v10.5.6
Changed
- Updated dependencies
v10.5.5
Fixed
- CNAME chains terminating at a zonecut no longer drop earlier hops from the answer section.
maybe_add_zonecut_records/5previously filtered CNAMEs by target name, which removed any CNAME whose target stayed inside the parent zone — breaking multi-hop chains where only the last hop crossed the cut. The filter now keys off the CNAME owner name, preserving every parent-zone CNAME in the chain.
v10.5.4
Changed
- Improve transport logs
v10.5.3
Changed
- Improve transport logs
- Improve pipeline dependency error message
v10.5.2
Changed
- Export
get_pipeline/0,1fromerldns_pipeline
v10.5.1
Changed
- Zone loading from zonefiles: records from
dns_zone:parse_file/1now load successfully.
v10.5.0
Added
- Telemetry events to zone creation and deletion #344
Fixed
- Record counters are correctly garbage collected #344
v10.4.4
Fixed
- Fixes wrong zone reuse and a
case_clauseerror when the delegated zone differed from the caller's zone #341 - When following delegation chains,
resolve_authoritative/7keeps track of a recursion depth and stops after 32 steps with a SERVFAIL, preventing infinite loops #342 - Simplify restart query operations on CNAME delegations #343
v10.4.3
Fixed
- Upgrade dns_erlang
v10.4.2
Fixed
erldns_zone_cache:delete_zone_rrset/5correctly returnsok | zone_not_found
v10.4.1
Fixed
- Ensure records are normalised as FQDN when using the sync counter zone cache functionality
v10.4.0
Added
- Zone cache: pre-reversed labels (used on every lookup),
zone_name_existenceand one-shot resolved lookups (#333) - Helper boolean filters for common record types (#332)
- Error logging on request timeout (#332)
- Log ingress and current timestamps when dropping a packet (#332)
- Richer context on query timeouts (what query actually timed out) (#332)
Fixed
- Zone cache and resolver: reworked for performance and correctness; fewer redundant computations at runtime (#333)
- Optimised
erldns_dnssecanderldns_resolverpipes (#333) - Logging and observability: connection idle timeout at debug level; TCP socket errors and ingress timeouts at notice/info; skip logging TCP killed when we killed it ourselves; use
log_metadatahelper; clearer TCP worker log naming (#332) - Resolver: tiny list processing improvement; async cancel timers for timers (#332)
- Upgraded
dns_erlangdependency with DNSSEC ECDSA fixes
v10.3.0
Added
- Allow to use binary strings to specify listener IP
- Allow to use binary strings to specify zones path
v10.2.1
Fixed
- Updated changelog
v10.2.0
Added
- Pipeline suspension for non-blocking async operations: pipes can return
{suspend, Msg, Opts, AsyncFun}to run blocking work in a bounded worker pool so listener workers are not blocked (#327)
v10.1.1
Fixed
- Upgraded dns_erlang, which fixes a series of bugs regarding SVCB params (#329)
v10.1.0
Added
- Redesigned RFC compliant codecs for the Admin API (#325)
Fixed
- Fixed spurious trailing dots in the admin API (#325)
- Fixed badly formatted TXT records in the admin API (#325)
v10.0.0
Added
- Better overload management (#301 #302 #306)
- RFC7766 pipelining support for TCP/TLS with concurrent request processing (#300)
- DNS over TLS (DoT) support per RFC 7858 (#300)
- Configurable request timeout monitoring for TCP workers with SERVFAIL responses (#300)
- Codec support for SVCB and HTTPS record types (#313)
- Codec support for many new record types introduced in
dns_erlangv4.9.0 (#312):- OPENPGPKEY (Type 61) — RFC 7929
- SMIMEA (Type 53) — RFC 8162
- URI (Type 256) — RFC 7553
- WALLET (Type 262) — IANA Registration
- EUI48 (Type 108) and EUI64 (Type 109) — RFC 7043
- CSYNC (Type 62) — RFC 7477
- DSYNC (Type 66) — RFC 9859
- Add initial documentation regarding the Admin API (#316)
Changed
- Move TCP and UDP ingress timeout configuration to per-listener
optsmap (#300) - Rename transport type
bothtostandardfor clarity (#300) - Upgrade dns_erlang dependency
- Includes small performance optimisations
- Adds support for many new record types
- Adds
dns:decode_query/1for early stop of bad input
Removed
rfc_compliant_entconfiguration option. RFC 4592 compliant empty non-terminal (ENT) handling is now always enabled (#308)- Global
ingress_tcp_request_timeoutandingress_udp_request_timeoutapplication environment variables are now configured per listener (#300)
v9.1.0
Added
- Implement basic RFC8914 extended errors (#290)
- Add support for standard DNS zone files (RFC-style) in addition to JSON format, this also improves loading times and initialisation (#291)
- Admin API now adds extensibility points to include custom HTTP handlers and TLS configuration (#294)
Updated
v9.0.0
Added
- Add support for RFC6605: ECDSA for DNSSEC.
- Add support for RFC8080: Ed22519/Ed448 for DNSSEC.
- Add support for RFC9077: NSEC/NSEC3 TTLs.
Changed
- Logic for handling DS type queries is changed to be RFC compliant, see: #285.
Removed
- Support for encoding/decoding records of type SPF.
Fixed
- Implement ENTs compliant with RFC4592
v8.1.0
Changed
- Add ENT support for wildcard synthesis meeting RFC 4592 specification requirements (#279).
The behaviour is currently opt-in using the
rfc_compliant_entoption in erdns.zones config.
v8.0.0
This release has many optimisations, documentation and code quality improvements.
Changed
- Rework
erldns_zone_cacheanderldns_resolver: algorithm is extensively optimised and now supports ENT correctly. - Rework
erldns_handler: behaviour is now improved and clearly defined. Minimum supported handler version is now2. - Split
erldns_resolverpipe into more granular steps, addingerldns_resolver_recursive,erldns_dnssec,erldns_sorter, anderldns_section_counter. - Add
erldns_questionsquestions filter to the packet pipeline. - Update dns_erlang to v4.3 and remove
erldns_records:name_type/1. - Accept no SOA record if no RRSIG are required.
- Documentation improvements (#267)
- Separate edns payload size over UDP as a configurable pipe (#267)
- Extend pipelines with halt and secondary pipelines (#268)
Added
[erldns, pipeline, questions]telemetry event with#{count => non_neg_integer()}wherecountis the number of questions removed.- Document some design decisions (#265)
- Add TLSA record support (#270)
Deprecated
- SPF record support will be removed in the upcoming releases (https://blog.dnsimple.com/2025/07/discontinuing-spf-record-type/)
Fixed
v7.0.0
This is a big release full of massive performance improvements and protocol compliance, but also of breaking changes. Read carefully the changelog and the documentation before migrating.
Changed
The application is now divided in three core subsystems, that is, listeners, packet pipelines,
and zones, which are configured differently and will require migration.
See erldns_listeners. erldns_pipeline and erldns_zones respectively for documentation
on how to reconfigure.
Telemetry events, as well as logger events, are entirely scoped within these respective subsystems,
that means, that the events are now prefixed with [erldns, request, _], for listener workers,
and [erldns, pipeline] for pipeline processing. Similarly, logger events are tagged with
domain => [erldns, admin | listeners | pipeline | zones] metadata, and all are structured.
Custom parsers and encoders
If you had any custom parser or encoder, you will need to update them to the new API, which unifies
both into a single module. See erldns_zone_codec for more information on its callbacks. Note
that the zone_to_erlang/1,2 callbacks are now decode/1 and zone_*/x callbacks are now
encode/2, and they all take only maps as input and output respectively.
TXT and SPF record formats
TXT and SPF record formats have changed, from a single string, to an array, to support more complex DNS records & use cases, so that the following:
{
...
"type": "TXT",
"data": {
"txt": "\"Hi, this is some text\" \"with extras\""
}
},becomes
{
...
"type": "TXT",
"data": {
"txts": ["Hi, this is some text", "with extras"]
}
},A warning will be logged for each invalid record, but they will be skipped, and not loaded.
For more important changes, see:
- Refactor the query processing pipeline #224
- Reimplement the network stack #225
- Rework zones loader #230
- Rework zones codecs #231
- Rework zones cache #232
- Rework documentation and internals #233
- Fix overriding packet size in optrr record #242
- Upgrade
dns_erlangto v4. - Use
segmented_cachefor the zone cache and the throttle modules.
Added
- Support for OTP28 #220
- Support for
dns_erlangv4, which enforces strings as binaries and options as maps - Introduce domain tag in logger events #244
- zone cache
put_rrset_zoneaccepts zone records #243 - Add statistic functionality to listeners #227
Removed
- Support for TXT and SPF records with data as a single string, they must be a list of strings instead.
- Support for the
erldns_txtparser #248 - Support for zone parsers taking input as lists #231
Fixed
Security
- Introduce backpressure and load shedding #240
6.0.2
- Add mailbox length telemetry events.
- Keep the handlers state in an ets table and avoid the singleton gen_server call.
6.0.1
- Add terminating context to telemetry span events
6.0.0
- Instrument code using telemetry in a metrics agnostic way.
5.0.0
- Introduce support for Logger
- Remove lager
- Remove the
erldns_eventssingleton.
4.3.1
- Export dnssec internal new API endpoint
4.3.0
- Add support for NSEC compact denial of existence
4.2.4
- Add support for zone records directory loading
- Add the latest
dnstestversion fixing almost all tests
4.2.3
- Update
dns_erlang: fix EDNS0 compliance for truncated records and unsupported versions
4.2.2
- Test admin API and fix bugs related to authentication and json encoding
4.2.1
- Ensure supervision tree starts correctly
4.2.0
- Merge admin and metrics APIs into this repository.
4.1.2
- Hide SPF/TXT multipart handling behind a feature flag
- Fix a bug mixing SPF and TXT records
4.1.1
- Bugfix handling null in the zone parser json payloads
4.1.0
- Introduce SPF/TXT multipart handling (#150)
4.0.0
- Add ex_doc support
- Remove support for OpenTelemetry.
3.0.0
Changed
- Bumps to OTP/27
- Replaced "jsx" with "json"
- Bumps to dns_erlang/v2.0.0
Added
- erlfmt
- CONTRIBUTING.md
- CHANGELOG.md
- release process to hex.pm
2.2.0
- ...