PowerDNS - DNSQuestion 始终为零
PowerDNS - DNSQuestion is always nil
我已经在 Debian 9 上成功设置了 PowerDNS (4.0.4-1+deb9u4) 和 MySQL 后端,系统正在正确解析主机。我正在尝试向递归器添加脚本并使用了示例,Lua script examples. I have pointed the pdns-resolver's conf correctly at my lua script, and I see my log statements print correctly, but I am consistently receiving an error regarding the DNSQuestion 实例对于所有示例 lua 函数都是空的。
例如:
function preresolve(dq)
pdnslog("Got question for "..dq.qname:toString().." from "..dq.remoteaddr:toString().." to "..dq.localaddr:toString())
return true;
end
结果:
STL error (a.root-servers.net/A from 127.0.0.1): Trying to cast a lua variable from "nil" to "b"
(表示 DNSQuestion 实例为空)。
显然 lua 脚本是 运行,但由于某些原因,所有 dq 实例都是空的。
有什么我可能误解或遗漏的东西会导致参数为零吗?
有你的功能 return true
或 false
所以默认情况下它不会 return nil
。
我已经在 Debian 9 上成功设置了 PowerDNS (4.0.4-1+deb9u4) 和 MySQL 后端,系统正在正确解析主机。我正在尝试向递归器添加脚本并使用了示例,Lua script examples. I have pointed the pdns-resolver's conf correctly at my lua script, and I see my log statements print correctly, but I am consistently receiving an error regarding the DNSQuestion 实例对于所有示例 lua 函数都是空的。
例如:
function preresolve(dq)
pdnslog("Got question for "..dq.qname:toString().." from "..dq.remoteaddr:toString().." to "..dq.localaddr:toString())
return true;
end
结果:
STL error (a.root-servers.net/A from 127.0.0.1): Trying to cast a lua variable from "nil" to "b"
(表示 DNSQuestion 实例为空)。
显然 lua 脚本是 运行,但由于某些原因,所有 dq 实例都是空的。
有什么我可能误解或遗漏的东西会导致参数为零吗?
有你的功能 return true
或 false
所以默认情况下它不会 return nil
。