]> git.ipfire.org Git - thirdparty/pdns.git/commit
dnsdist: Fix access to frontends while in client mode 16090/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 5 Sep 2025 14:38:49 +0000 (16:38 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 5 Sep 2025 14:42:36 +0000 (16:42 +0200)
commite6b9a30bbe1e198702308d9904d067eb89b646f1
treeb51ba5b1db984fc66d09a01a08e5ff2728d9331f
parent858e581ade0e41014dfd6fb4f2ad35c6b52c921c
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>
pdns/dnsdistdist/dnsdist-lua.cc
regression-tests.dnsdist/test_DOH.py