Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In dnsdist local address and port are not exposed in Lua #3198

Closed
jstrika opened this issue Jan 9, 2016 · 2 comments
Closed

In dnsdist local address and port are not exposed in Lua #3198

jstrika opened this issue Jan 9, 2016 · 2 comments

Comments

@jstrika
Copy link

jstrika commented Jan 9, 2016

In dnsdist --version : 0.0.g5a3409c , configuration file has support for Lua functions but "local" address and port are not accessible.

In example blockFilter(remote, qname, qtype, dh) from https://github.com/PowerDNS/pdns/blob/master/pdns/dnsdistconf.lua we can access "remote" address and port using remote:tostring(), remote:tostringWithPort(), remote:getPort() but not the "local" address and port.

Since dnsdist was recently introduced and not yet widely implemented, did you consider keeping consistency with new pdns v4 and pass "dq" native object instead of strings like: blockFilter(dq) ? That way the community can benefit from "portable" sample code between 2 products and use someting like: dq.remoteaddr:toStringWithPort().." to "..dq.localaddr:getPort()

@rgacogne
Copy link
Member

With the merge of #3233, dnsdist now uses a DNSQuestion dq, as close as possible as the PDNS4 one. The "local" address and port are available in this new object. Thank you for the suggestion!

@jstrika
Copy link
Author

jstrika commented Jan 15, 2016

Fantastic, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants