mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

lutoff
14.51.2007 5d8bdf3c45ba5425410a8ca278ae6df9655f3c71
Fix for issue #2648 (dsconfig/dsreplication do not work with ipv6 address):
Before creating the ldapURL, check if we have an IPv6 address
4 files modified
10 ■■■■■ changed files
opends/src/server/org/opends/server/admin/client/cli/DsFrameworkCliParser.java 2 ●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/admin/client/ldap/JNDIDirContextAdaptor.java 4 ●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/tools/dsconfig/LDAPManagementContextFactory.java 2 ●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/util/cli/ConsoleApplication.java 2 ●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/admin/client/cli/DsFrameworkCliParser.java
@@ -218,7 +218,7 @@
    InitialLdapContext ctx = null;
    // Get connection parameters
    host = getHostName();
    host = ConnectionUtils.getHostNameForLdapUrl(getHostName());
    port = getPort();
    dn   = getBindDN();
    pwd  = getBindPassword(dn, out, err);
opends/src/server/org/opends/server/admin/client/ldap/JNDIDirContextAdaptor.java
@@ -47,6 +47,7 @@
import javax.naming.ldap.LdapName;
import javax.naming.ldap.Rdn;
import org.opends.admin.ads.util.ConnectionUtils;
import org.opends.server.admin.client.AuthenticationException;
import org.opends.server.admin.client.AuthenticationNotSupportedException;
import org.opends.server.admin.client.CommunicationException;
@@ -101,7 +102,8 @@
    env
        .put(Context.INITIAL_CONTEXT_FACTORY,
            "com.sun.jndi.ldap.LdapCtxFactory");
    env.put(Context.PROVIDER_URL, "ldap://" + host + ":" + port);
    String hostname = ConnectionUtils.getHostNameForLdapUrl(host) ;
    env.put(Context.PROVIDER_URL, "ldap://" + hostname + ":" + port);
    env.put(Context.SECURITY_PRINCIPAL, name);
    env.put(Context.SECURITY_CREDENTIALS, password);
opends/src/server/org/opends/server/tools/dsconfig/LDAPManagementContextFactory.java
@@ -119,7 +119,7 @@
    {
      // Interact with the user though the console to get
      // LDAP connection information
      String hostName = ci.getHostName();
      String hostName = ConnectionUtils.getHostNameForLdapUrl(ci.getHostName());
      Integer portNumber = ci.getPortNumber();
      String bindDN = ci.getBindDN();
      String bindPassword = ci.getBindPassword();
opends/src/server/org/opends/server/util/cli/ConsoleApplication.java
@@ -746,7 +746,7 @@
  {
    // Interact with the user though the console to get
    // LDAP connection information
    String hostName = ci.getHostName();
    String hostName = ConnectionUtils.getHostNameForLdapUrl(ci.getHostName());
    Integer portNumber = ci.getPortNumber();
    String bindDN = ci.getBindDN();
    String bindPassword = ci.getBindPassword();