]> git.ipfire.org Git - thirdparty/pdns.git/commit
dnsdist: Fix setting meta keys on response, pass them from question to response 16178/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 25 Sep 2025 10:01:52 +0000 (12:01 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 25 Sep 2025 12:29:42 +0000 (14:29 +0200)
commite3381435870e89c8573efb4a44497a08b0807b24
treebc2c6097c3ec00c45627e9be0e469bf2a787008f
parentc64b979bc0aef7d6351b3c29de7a6082530bcc00
dnsdist: Fix setting meta keys on response, pass them from question to response

This commit fixes setting Protocol Buffer meta keys on DNS response via Lua FFI:
the existing code was assuming it was possible to use the question methods on a
response object which is not true and would likely have ended in a crash at some
point.
It also propates meta keys set on a DNS question to the corresponding DNS response.
Before this commit the values were not passed along to the response which was quite
unexpected, especially for self-answered responses.

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
pdns/dnsdistdist/dnsdist-actions-factory.cc
pdns/dnsdistdist/dnsdist-idstate.cc
pdns/dnsdistdist/dnsdist-idstate.hh
pdns/dnsdistdist/dnsdist-lua-bindings-dnsquestion.cc
pdns/dnsdistdist/dnsdist-lua-ffi-interface.h
pdns/dnsdistdist/dnsdist-lua-ffi.cc
pdns/dnsdistdist/dnsdist-lua-ffi.hh
pdns/dnsdistdist/dnsdist.hh
pdns/dnsdistdist/docs/reference/dq.rst
pdns/dnsdistdist/test-dnsdist-lua-ffi.cc
regression-tests.dnsdist/test_Protobuf.py