Hi,
I am using Mozilla LDAP SDK 6.0.4 libraries to connect to a directory
server. While the code works fine for IPv4 addresses, it fails with
IPv6 address.
I have the DS (5.2 and 6.1) installed on my system (Windows XP). The C
code snippet is given below:

...
if ((ld = ldap_init(argv[1], ldap_port)) == NULL) {
printf("Error initializing\n");
exit(1);
}

if ((r = ldap_simple_bind_s(ld, "cn=directory manager", "admin1234")) !
= LDAP_SUCCESS) {
printf("Error binding %s\n", ldap_err2string(r));
exit(1);
}
...

If I pass an IPv4 address to ldap_init(), everything works fine. But
if i use the IPv6 loopback address (::1), ldap_simple_bind_s() fails
with the following error:

Error binding Can't connect to the LDAP server

I am able to ping successfully to ::1.

Could anyone please help me resolve this issue?
_______________________________________________
dev-tech-ldap mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-ldap

Reply via email to