extend DLZ interface and example with ECS support

Apparently we forgot about DLZ when updating DNS_CLIENTINFO_VERSION
constant for ECS, which is at value "3" since ECS was introduced.

The code in example drivers and tests now hardcodes version numbers
2 (without ECS) and 3 (with ECS) depending on what a given code path
requires.

(cherry picked from commit f81debe1c8)
This commit is contained in:
Petr Špaček
2021-11-02 22:43:30 -07:00
committed by Evan Hunt
parent 317ef804c0
commit 34f6cce2c6
4 changed files with 25 additions and 14 deletions

View File

@@ -480,8 +480,7 @@ dlz_lookup(const char *zone, const char *name, void *dbdata,
* If the DLZ only operates on 'live' data, then version
* wouldn't necessarily be needed.
*/
if (clientinfo != NULL && clientinfo->version >= DNS_CLIENTINFO_VERSION)
{
if (clientinfo != NULL && clientinfo->version >= 2) {
dbversion = clientinfo->dbversion;
if (dbversion != NULL && *(bool *)dbversion) {
loginfo("dlz_example: lookup against live transaction");