bind9 with ldap using dlz

Hello guys, can anyone help me with the below error I'm getting from bind9? I'm trying to make bind read all the zone info from openldap, I have already created the schema and I've put some info into the ldap. I have also tried to google the error with no success.

I'm aware there is an problem using %zone% tags (the % is the problem) and I think there is a patch or something to put it as $zone$.

Is that problem related to this error? I'm asking because I'm unsure if this has already been fixed.

My OS in a Debian

cat /etc/debian_version
5.0.2

from /var/log/daemon.log

Aug 31 14:53:16 lab1 named[3215]: starting BIND 9.5.1-P3 -u bind
Aug 31 14:53:16 lab1 named[3215]: found 2 CPUs, using 2 worker threads
Aug 31 14:53:16 lab1 named[3215]: using up to 4096 sockets
Aug 31 14:53:16 lab1 named[3215]: loading configuration from '/etc/bind/named.conf'
Aug 31 14:53:16 lab1 named[3215]: max open files (1024) is smaller than max sockets (4096)
Aug 31 14:53:16 lab1 named[3215]: using default UDP/IPv4 port range: [1024, 65535]
Aug 31 14:53:16 lab1 named[3215]: using default UDP/IPv6 port range: [1024, 65535]
Aug 31 14:53:16 lab1 named[3215]: listening on IPv6 interfaces, port 53
Aug 31 14:53:16 lab1 named[3215]: listening on IPv4 interface lo, 127.0.0.1#53
Aug 31 14:53:16 lab1 named[3215]: listening on IPv4 interface eth0, 192.168.1.101#53
Aug 31 14:53:16 lab1 named[3215]: Loading 'ldap zone' using driver ldap
Aug 31 14:53:16 lab1 named[3215]: parsing allow zone transfer query failed
Aug 31 14:53:16 lab1 named[3215]: SDLZ driver failed to load.
Aug 31 14:53:16 lab1 named[3215]: DLZ driver failed to load.
Aug 31 14:53:16 lab1 named[3215]: loading configuration: failure
Aug 31 14:53:16 lab1 named[3215]: exiting (due to fatal error)

cat /etc/bind/named.conf.local


//
// Do any local configuration here
//
// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";
dlz "ldap zone" {
        database "ldap 2
        v3 simple {cn=admin,dc=domain,dc=com} {pass} {127.0.0.1}
        ldap:///DNSZoneName=_zone_,ou=dns,o=bind-DNS???objectclass=DNSZone
        ldap:///DNSHostName=%record%,DNSZoneName=%zone%,ou=dns,o=bind-DNS?DNSTTL,DNSType,DNSPreference,DNSData,DNSIPAddr?sub?(&(objectclass=DNSAbstractRecord)(!(DNSType=soa)))
        ldap:///DNSHostName=@,DNSZoneName=%zone%,ou=dns,o=bind-DNS?DNSTTL,DNSType,DNSData,DNSPrimaryNS,DNSAdminEmail,DNSSerial,DNSRefresh,DNSRetry,DNSExpire,DNSMinimum?sub?(&(objectclass=DNSAbstractRecord)(DNSType=soa))
        ldap:///DNSZoneName=%zone%,ou=dns,o=bind-DNS?DNSTTL,DNSType,DNSHostName,DNSPreference,DNSData,DNSIPAddr,DNSPrimaryNS,DNSAdminEmail,DNSSerial,DNSRefresh,DNSRetry,DNSExpire,DNSMinimum?sub?(&(objectclass=DNSAbstractRecord)(!(DNSType=soa)))
        ldap:///DNSZoneName=%zone%,ou=dns,o=bind-DNS??sub?(&(objectclass=DNSXFR)(DNSIPAddr=%client%))";
};

Well I tried to apply the $ path with no luck, it still does not work, does anyone knows if there is any official patch out there for that?

I followed this link
Gmane -- Mail To News And Back Again

I guess I will have to get happy with bind using mysql instead of ldap, I don't seem to find any clue about the issue with ldap... :confused: