Connecting to Sun DS 5.2 and 6.1 using IPv6 address
venu <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.directory |
|---|---|
| Organization | http://groups.google.com |
| Message-ID | <dde1d075-567f-42f6-b7a4-27615102ddc7@i76g2000hsf.googlegroups.com> |
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?