]> git.ipfire.org Git - thirdparty/bind9.git/commit
add support for multiple EDE
authorColin Vidal <colin@isc.org>
Tue, 14 Jan 2025 16:13:42 +0000 (17:13 +0100)
committerColin Vidal <colin@isc.org>
Thu, 23 Jan 2025 13:12:53 +0000 (13:12 +0000)
commite685443c74f1faae6f83f0c3c68d67dc903bb4aa
treec34e821c5065e23a1382130ca29ee66141d88f08
parent2bbb30156b02b8675ec2e4f693ec3709d86d64fb
add support for multiple EDE

Extended DNS error mechanism (EDE) enables to have several EDE raised
during a DNS resolution (typically, a DNSSEC query will do multiple
fetches which each of them can have an error). Add support to up to 3
EDE errors in an DNS response. If duplicates occur (two EDEs with the
same code, the extra text is not compared), only the first one will be
part of the DNS answer.

Because the maximum number of EDE is statically fixed, `ns_client_t`
object own a static vector of `DNS_DE_MAX_ERRORS` (instead of a linked
list, for instance). The array can be fully filled (all slots point to
an allocated `dns_ednsopt_t` object) or partially filled (or
empty). In such case, the first NULL slot means there is no more EDE
objects.

(cherry picked from commit 4096f2713075362b204a88eee1b6bc30e609a328)
lib/dns/include/dns/message.h
lib/dns/message.c
lib/ns/client.c
lib/ns/include/ns/client.h
lib/ns/query.c