Re: Missing DNSName:wirelength on recursor 4.2?
Remi Gacogne <[email protected]> Tue, 30 Jul 2019 08:50:08 +0200
| Newsgroups | gmane.network.dns.powerdns.devel |
|---|---|
| Message-ID | <[email protected]> |
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.
[1]:
https://github.com/PowerDNS/pdns/commit/c052aac71b2ff336ca59421a5bee30564ce9562a
[2]: https://github.com/PowerDNS/pdns/pull/8142
Best regards,
--
Remi Gacogne
PowerDNS.COM BV - https://www.powerdns.com/
_______________________________________________
Pdns-dev mailing list
[email protected]
https://mailman.powerdns.com/mailman/listinfo/pdns-dev
signature.asc
(application/pgp-signature, 488 B)
-----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEE1jAMq8v0abvjkuUDogjtT4r1hEYFAl0/6KAACgkQogjtT4r1 hEb3JQf/TqB+64jvlmLOqnxrcanRzDRDsKceB4HSaF+AYPXA+/EXBucFcssNn3mo kcRhcHeAstZ1EemALO7QdfuJzi6mEAqKG+nNCoEpuzhwRJ6c+R7GEMMnkGhlx2R3 jVXc/p9eXq5OVQHpwIy608Gy3LyUStucJdfcI4rKDWekpUXpKM5UaSajv31ue7mk vxQse3ohpKHlxrx5lGmOhTsAMebXwDQTHYBC6H3NFa4YTNqnvXncw/za83Q2QFby BKU84ExITx/l1pzIzCLWfBpnN4Px9A1Kqck2c3byiP+5DfCJseLuoNpOx2oMOerd psMo0LID9OK7HcEkNmXcOlJV7jHBdg== =kgAf -----END PGP SIGNATURE-----