[Pdns-users] PDNS/LDAP and IPv6 reverse issue

Norbert Sendetzky norbert at linuxnetworks.de
Thu Feb 19 18:43:58 UTC 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thursday 19 February 2004 03:38, Aredridel wrote:
> I do a reverse lookup for 2001:470:1f00:183::1, and what's searched
> for in LDAP is:
>
> 	base="ou=Domains,dc=independence,dc=net" scope=2
> 	filter="(aAAARecord=21:470:1f0:183:0:0:0:1)"
>
> Notice the discrepancy between "2001" and "21" and "1f00" and "1f0"

Yes, the algorithm to convert a reverse IPv6 address to a usable 
AAAARecord has a flaw: It removes the zeros in the middle.

I've attached a diff to modules/ldapbackend/utils.hh, which fixes this 
misbehavior. Could you please apply it to your pdns-2.9.15 sources 
(in the pdns directory: "cat ../ldap_utils.diff | patch -p1") and 
verify that it works?

The correct AAAARecord filter must then be 2001:470:1f00:183:0:0:0:1.

> ... also, the usual way to specify addresses is with the long
> sequence of zeroes truncated to :: -- though I can rework my
> directory around that.

You can't truncate a sequence of zeros here, because your entries only 
contain text and your ldap server don't know that the content is a 
short form of an IPv6 address. If you enter ::1 it won't be found, 
because the query from the client is 0:0:0:0:0:0:0:1.


Norbert

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iEYEARECAAYFAkA1A/IACgkQxMLs5v5/7eDz6gCePk7o6pw2S82LU2v8HyWSZrIT
tTwAnRumiwWaTvNqXE2kuZ+19EJ8OvB0
=StK/
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ldap_utils.diff
Type: text/x-diff
Size: 938 bytes
Desc: not available
URL: <http://mailman.powerdns.com/pipermail/pdns-users/attachments/20040219/b1007bda/attachment-0001.diff>


More information about the Pdns-users mailing list