directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1739708 - /directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/HostAddress.java
Date Mon, 18 Apr 2016 08:56:52 GMT
Author: elecharny
Date: Mon Apr 18 08:56:52 2016
New Revision: 1739708

URL: http://svn.apache.org/viewvc?rev=1739708&view=rev
Log:
Applied patch from DIRSERVER-2139

Modified:
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/HostAddress.java

Modified: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/HostAddress.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/HostAddress.java?rev=1739708&r1=1739707&r2=1739708&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/HostAddress.java
(original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/components/HostAddress.java
Mon Apr 18 08:56:52 2016
@@ -20,6 +20,7 @@
 package org.apache.directory.shared.kerberos.components;
 
 
+import java.net.Inet6Address;
 import java.net.InetAddress;
 import java.net.UnknownHostException;
 import java.nio.BufferOverflowException;
@@ -111,7 +112,7 @@ public class HostAddress implements Asn1
      */
     public HostAddress( InetAddress internetAddress )
     {
-        addrType = HostAddrType.ADDRTYPE_INET;
+        addrType = ( internetAddress instanceof Inet6Address ) ? HostAddrType.ADDRTYPE_INET6
: HostAddrType.ADDRTYPE_INET;
         byte[] newAddress = internetAddress.getAddress();
         address = new byte[newAddress.length];
         System.arraycopy( newAddress, 0, address, 0, newAddress.length );



Mime
View raw message