erldns_edns_nsid (erldns v13.0.0)
View SourceIdentify the server to the clients that ask, with NSID (RFC 5001) and the id.server and
hostname.bind queries (RFC 4892).
- A query carrying an NSID option gets the server's identifier back in an NSID option. Data in the query's option is ignored (RFC 5001 §2.2), and a query without the option gets none.
- A TXT query of class CH for
id.serverorhostname.bindis answered with the identifier, in a TXT record of class CH with a TTL of 0. The record's name is the lowercased query name.
Configuration
{erldns, [
{packet_pipeline, [
erldns_edns,
erldns_questions,
erldns_edns_nsid,
erldns_query_throttle,
erldns_packet_cache,
...
]},
{edns_nsid, #{
id => <<"ns1-ams">> %% 1 to 255 bytes, no default
}}
]}The pipe is disabled until id is set, and an invalid id or configuration stops the pipeline
from starting. Any client can ask for the identifier, so pick one that is safe to publish.
The pipe requires erldns_edns and erldns_questions before it, and erldns_resolver and
any erldns_packet_cache after it, so that queries with and without NSID are cached apart.
Summary
Functions
erldns_pipeline:call/2 callback.
erldns_pipeline:deps/0 callback.
erldns_pipeline:prepare/1 callback.
Functions
-spec call(dns:message(), erldns_pipeline:opts()) -> erldns_pipeline:return().
erldns_pipeline:call/2 callback.
-spec deps() -> erldns_pipeline:deps().
erldns_pipeline:deps/0 callback.
-spec prepare(erldns_pipeline:opts()) -> disabled | erldns_pipeline:opts().
erldns_pipeline:prepare/1 callback.