-
Notifications
You must be signed in to change notification settings - Fork 975
Closed
Description
- Program: dnsdist
- Issue type: Bug report
Short description
Since 1.5 it should be possible to pass an options table to a SpoofAction constructor in order to set the TTL of the generated record. However this does not seem to work as expected:
dnsdist> SpoofAction("192.168.100.223", {ttl=3600})
Error: Unable to convert parameter from table to N5boost8optionalINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE>
On the other hand supplying a list of two or more addresses plus the trailing options works fine.
Environment
- Operating system: Linux (Gentoo)
- Software version: 1.5.1
- Software source: package / built from source (gcc-10.2, boost-1.74)
Steps to reproduce
- SpoofAction("192.168.100.223") -> works
- SpoofAction("192.168.100.223", {ttl=3600}) -> does not work
- SpoofAction("192.168.100.223", "192.168.100.223", {ttl=3600}) -> works, but with duplicated entry
Other information
I suspect the function untangling the arguments has problems distinguishing between a single string and a list of strings, here. I don't understand enough about Lua/C++ value coercion and how boost::variant works to fix this myself though.