-
Hi everyone! We are currently migrating to DNSdist version 2 and are converting our configuration files step-by-step into YAML. I am currently stuck on converting some LUA functions and am unable to achieve a working equivalent. Here what we have:
I tried something like this, which does not work (error when launching dnsdist service):
What would be the YAML equivalent? I'm not quite sure if dynamicRule would help... Would you happen to have any examples of YAML configurations that are already in place and operational? Thank you in advance for your assistance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The Lua code passed in |
Beta Was this translation helpful? Give feedback.
The Lua code passed in
function_code
needs to return a function, so you would have to addreturn blacklistIP
at the end of the snippet. But a bigger problem is that selectors and actions are not available in this context, so callingTimedIPSetRule()
is not going to work. Right now I don't see a way to do what you want from the YAML configuration, so I'm afraid it would have to remain in Lua format. I'll consider making selectors and actions available in the YAML configuration context in 2.0.1.