]> git.ipfire.org Git - thirdparty/pdns.git/commit
dnsdist: Fix access to frontends while in client mode 16095/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 5 Sep 2025 14:38:49 +0000 (16:38 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 8 Sep 2025 12:33:16 +0000 (14:33 +0200)
commitaea25054fd1f8404512bd2accbb2c0a63a39cdd5
tree14b30c2e9271d1083c22dce0093a4561e5645fd5
parent4e6e67fa8e4d224ed4bc79dda80db86f427b6d82
dnsdist: Fix access to frontends while in client mode

Since 2.0 we return `nil` instead of an object containing a `NULL`
pointer when the requested object does not exist, to make it possible
to check the validity of the returned object from `Lua`. It makes
sense in all contexts except when we are in client mode, because
then accessing the object in the remaining parts of the configuration
will trigger an error. Our DNS over HTTPS documentation itself contains
such a Lua configuration snippet, which is now broken.
This commit reverts back to sending an object containg a `NULL`
pointer when accessing the frontends in the client mode case.

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit e6b9a30bbe1e198702308d9904d067eb89b646f1)
pdns/dnsdistdist/dnsdist-lua.cc
regression-tests.dnsdist/test_DOH.py