Skip to content

SpoofAction constructor with (single-ip, options) does not work #9783

@hhoffstaette

Description

@hhoffstaette
  • 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

  1. SpoofAction("192.168.100.223") -> works
  2. SpoofAction("192.168.100.223", {ttl=3600}) -> does not work
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions