[Pdns-dev] Missing DNSName:wirelength on recursor 4.2?

Remi Gacogne remi.gacogne at powerdns.com
Tue Jul 30 06:50:08 UTC 2019

Hi Daniel,

On 7/30/19 12:44 AM, Daniel Cid wrote:
> First, thanks for the continued work on PowerDNS. We love it and use it
> everywhere we can (including on CleanBrowsing).

Cool :)

> Anyway, we started testing the new version ( PowerDNS Recursor 4.2.0 )
> and I noticed that the DNSName:wirelength is always returning nil.
> Simple example:
> function preresolve(dq)
>     if(dq.qname:wirelength() <= 5) then
>         dointernallogging("wirelength < 5");
>     else
>         dointernallogging("wirelength > 5");
>     end
> When doing some domain checks via Lua. I assumed it got removed, but it
> still shows as valid here:
> https://doc.powerdns.com/recursor/lua-scripting/dnsname.html

It looks like it was renamed in [1] while adding and documenting some
Lua binding for the authoritative server. Unfortunately this file is
shared with the recursor and this change broke the documented
DNSName::wirelength() binding there.
I just opened a pull request [2] to fix that, which we will need to
backport to 4.2.x after it has been merged in master.

In the meantime, you could work around that issue by using
dq.qname:wireLength() instead, since this version will likely remain in
the future.

[2]: https://github.com/PowerDNS/pdns/pull/8142

Best regards,
Remi Gacogne
PowerDNS.COM BV - https://www.powerdns.com/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.powerdns.com/pipermail/pdns-dev/attachments/20190730/dcc65cf6/attachment.sig>

More information about the Pdns-dev mailing list