Subject: Re: pkg/33511: thunderbird doesn't do ldap
To: None <taya@NetBSD.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org,>
From: Mark Davies <mark@mcs.vuw.ac.nz>
List: pkgsrc-bugs
Date: 05/25/2006 02:15:04
The following reply was made to PR pkg/33511; it has been noted by GNATS.
From: Mark Davies <mark@mcs.vuw.ac.nz>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/33511: thunderbird doesn't do ldap
Date: Thu, 25 May 2006 14:10:32 +1200
Turns out it was the old "trying to use ipv6 sockets to do ipv4" issue. Ldap
lookups work if you "sysctl -w net.inet6.ip6.v6only=0".
Below is a patch that fixes it for me by using a v4 socket when dealing with
ldap servers that have a v4 address.
$NetBSD$
--- directory/c-sdk/ldap/libraries/libprldap/ldappr-io.c.orig 2006-05-25
11:38:04.000000000 +1200
+++ directory/c-sdk/ldap/libraries/libprldap/ldappr-io.c
@@ -292,12 +292,12 @@ prldap_try_one_address( struct lextiof_s
* Set up address and open a TCP socket:
*/
if ( PR_SUCCESS != PR_SetNetAddr( PR_IpAddrNull, /* don't touch IP addr.
*/
- PRLDAP_DEFAULT_ADDRESS_FAMILY, (PRUint16)port, addrp )) {
+ PR_NetAddrFamily( addrp ), (PRUint16)port, addrp )) {
return( -1 );
}
if (( prsockp->prsock_prfd = PR_OpenTCPSocket(
- PRLDAP_DEFAULT_ADDRESS_FAMILY )) == NULL ) {
+ PR_NetAddrFamily( addrp ))) == NULL ) {
return( -1 );
}
@@ -390,14 +390,14 @@ prldap_connect( const char *hostlist, in
if ( PR_SUCCESS == PR_StringToNetAddr( host, &addr )) {
- if ( PRLDAP_DEFAULT_ADDRESS_FAMILY == PR_AF_INET6 &&
+ /*if ( PRLDAP_DEFAULT_ADDRESS_FAMILY == PR_AF_INET6 &&
PR_AF_INET == PR_NetAddrFamily( &addr )) {
PRUint32 ipv4ip = addr.inet.ip;
memset( &addr, 0, sizeof(addr));
PR_ConvertIPv4AddrToIPv6( ipv4ip, &addr.ipv6.ip );
addr.ipv6.family = PR_AF_INET6;
- }
+ }*/
rc = prldap_try_one_address( prsockp, &addr, port,
timeout, options );
} else {
The same issue and patch will apply to firefox and mozilla as well.
cheers
mark