[Pdns-users] Using setRules() in dnsdist

David opendak at shaw.ca
Wed Sep 25 03:12:02 UTC 2019


On 2019-09-24 7:26 p.m., Steve Shipway wrote:
> Hi all;
> 
> I am having problems successfully using the setRules() function in
> dnsdist; probably I have incorrect syntax but the documentation is no
> help.  The documentation I have appears to suggest I pass the function
> an array of rule structures generated by newRuleAction() but it does
> not give an example.
> 
> Can anyone tell me what is wrong with this:
> 
>>    setRules({ newRuleAction( AllRule(), NoneAction() ) } )

Indeed it looks like this is broken in 1.3.3 (just tested) and looks 
like it should be fixed once 1.4.0 lands (tested fine on -rc2).

https://github.com/PowerDNS/pdns/pull/7594


> 
> I would expect this to replace all existing rules with a single noop
> rule affecting all packets, but instead I get a Lua error 'unable to
> convert parameter from table to St6vectorI17DNSDistRuleActionSaIS0_EE'
> 
> The purpose of this is to be able to update all the rules in one atomic
> operation, rather than to call clearRules() and then addAction() for
> each new rule.
> 
> Thanks in advance for any help,
> 
> Steve
> 
> 
> 
> _______________________________________________
> Pdns-users mailing list
> Pdns-users at mailman.powerdns.com
> https://mailman.powerdns.com/mailman/listinfo/pdns-users
> 



More information about the Pdns-users mailing list