mirror of
https://gitlab.nic.cz/knot/knot-dns.git
synced 2026-05-28 04:02:31 -04:00
Add the `mod-alias` query module which synthesises answers for ALIAS
records (type 65401) at query time by looking up the ALIAS target in
the server's zone database and copying the target's records into the
response with the original query name as the owner.
The module hooks at KNOTD_STAGE_PREANSWER and is attached at zone
scope (typically via a template). Behaviour:
* Fires for A/AAAA queries, any others passed through to the
standard resolver.
* ALIAS is additive: direct rrsets on the alias node are merged
with the synthesised target rrsets.
* Multiple ALIAS rdata on a node are followed and their results
merged.
* TTL = min(alias_ttl, all contributing source TTLs).
* Targets not served by a zone in this server are ignored;
external resolution is out of scope.
* Synthesised records are not signed; pair with mod-onlinesign
if signed answers are required.
The integration test runs in two random modes per invocation
(plain and DNSSEC-via-mod-onlinesign) so both code paths are
exercised over time.
Co-authored-by: Daniel Salzman <daniel.salzman@nic.cz>
11 lines
329 B
Dns
11 lines
329 B
Dns
$ORIGIN _ips.example.
|
|
$TTL 300
|
|
@ IN SOA ns.example. mail.example. ( 1 3600 900 604800 300 )
|
|
@ IN NS ns.example.
|
|
|
|
; Synthesis targets used by the alias zones.
|
|
web IN A 192.0.2.1
|
|
web IN AAAA 2001:db8::1
|
|
alt IN A 192.0.2.2
|
|
mail IN A 192.0.2.3
|
|
mail IN MX 10 mx.example.
|