pdns icon indicating copy to clipboard operation
pdns copied to clipboard

dnsdist: Refactor the Lua API for crafting answers

Open rgacogne opened this issue 3 years ago • 1 comments

  • Program: dnsdist
  • Issue type: Feature request

Short description

dnsdist has accumulated various methods of turning a query into an answer over the years, from SpoofAction to various FFI functions. It would be nice to do a good refactoring of these methods in 1.8.0, or 1.9.0.

Description

Built-in C++ actions will likely remain a bit limited, but the Lua FFI and non-FFI interfaces could use a better interface allowing one to:

  • set the rcode
  • optionally hint at how many records will be added
  • add a record by passing its type, class, section, TTL and raw content
  • state that the records can be turned into a packet

rgacogne avatar Jan 14 '22 15:01 rgacogne

One very annoying limitation from the current interface is that we cannot mix CNAME and A/AAAA, for example.

rgacogne avatar Sep 12 '25 09:09 rgacogne