dnsdist: How to send certain packets into the specified pool via "LuaFFIAction" #17649
|
Hello, I'm using "dnsdist 2.1.0-rc1 (Lua 5.1.4 [LuaJIT 2.1.1703358377])". I'd like to route requests to certain pool based on the value of a custom tag "tag_example", and all values of this tag are identical to the pool name (e.g. The tag value "dest_a" --> The pool name "dest_a"). I can simply achieve this using the following Lua function invoked by "LuaAction": However, if I switch "LuaAction" to "LuaFFIAction", the situation will change:
Here is an example of the relevant error logs: Users can use this function like that: |
Replies: 1 comment
|
You cannot use the |
You cannot use the
DNSAction.Pool, "dest_a"syntax from a Lua FFI function, you need to usednsdist_ffi_dnsquestion_set_resultto set the second parameter and then returnDNSAction.pool. I just added regression tests for this syntax in #17654 if you want an example.