[ldns-users] ldns-python bug in resolver.get_addr_by_name()
Willem Toorop
willem at NLnetLabs.nl
Wed Apr 13 14:55:07 UTC 2011
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Paul,
Indeed, the documentation showed such usage in the example.
The version in trunk now actually supports this behavior too.
Thanks for the report!
Willem
On 04/12/11 20:15, Paul Wouters wrote:
>
> The following works:
>
>>>> import ldns
>>>> resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf")
>>>> dnn = ldns.ldns_dname("www.google.com")
>>>> addr = resolver.get_addr_by_name(dnn)
>>>> for rr in addr.rrs():
> ... print rr
> ... www.l.google.com. 300 IN A 74.125.224.50
>
> [..]
>
> However, this does not work:
>
>>>> addr = resolver.get_addr_by_name("www.google.com")
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "/usr/lib/python2.7/site-packages/ldns.py", line 3898, in
> get_addr_by_name
> return _ldns.ldns_get_rr_list_addr_by_name(self, name, aclass, flags)
> TypeError: in method 'ldns_get_rr_list_addr_by_name', argument 2 of type
> 'ldns_rdf *'
>>>>
>
> The docs claim that get_addr_by_name() can do the string->dname
> conversion....
>
> Paul
> _______________________________________________
> ldns-users mailing list
> ldns-users at open.nlnetlabs.nl
> http://open.nlnetlabs.nl/mailman/listinfo/ldns-users
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQIcBAEBAgAGBQJNpblKAAoJEOX4+CEvd6SYhv0P/1iGlla5AfN6y3vXcf47+D44
NqxqppPhe+cGM62cdrwltlX/DZW0T3Q/olNlJwJMFxURsHZmBEKJousJq6CoMV6L
+badmltP4OltJRLZUYFezJzpJpR/zS9e3ovkVB4P9FisEwglv2JF0Xam8yPMpeTK
Xy0tWvsoDFecKVjlzgy1jaZgugxbOUCfWY/IcE8YTLq3u6miEO9+6VRJPchrfQF3
eb2DiBy+xYlb2xR8dd1yrg1jT31GR351oX8mdvG0vLjX2u3uuI6VuhzTWt9NodC+
E75oEFeT2g/rbsLCjFAaU0eVPGoD0dC0cUEDKpZwtmZQHHkaW2PrILmmF3OE/Sgw
nMaTLKF33CunVCB/iGEzT8W0z49qJnD4Xp2e9mI1FurZ2vDjzWNg5HnGv17Zew8h
++4mDjsEeVjPxwpYdluKK2jCQN+HFtkAttnHQ33fDqXJwWSEjp3+gBAvgeTMS6MG
k1CQmquGoEPYWJur/dxzEtOX5Q8KlgoPWRHn+hTrvlv3n95p9sagPyS3GgRd8voS
AAXYFOqfdRl1te19odlCQlJrakHU8NE8pyv8fFE4QN+wmgC9biqAXWUoRX+ZYEcj
BFK8ypoPm+ronIgbFS4BEYyPKQ4NbYke4GhHv3/r6DSUjUePodKgIBLnW5b0rggG
CEVvbYBB0ri0moUJkzZd
=nRJM
-----END PGP SIGNATURE-----
More information about the ldns-users
mailing list