Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-M19
    • Fix Version/s: 2.0.0-M22
    • Component/s: None
    • Labels:
      None

      Description

      Using ibm java, we ran into error:
      KrbException, status code: 38 message: Incorrect net address

      Debuging ApacheDS code, I found out exception comes from

              if ( ticket.getEncTicketPart().getClientAddresses() != null )
              {
                  if ( !ticket.getEncTicketPart().getClientAddresses().contains( new HostAddress( clientAddress ) ) )
                  {
                      throw new KerberosException( ErrorType.KRB_AP_ERR_BADADDR );
                  }
              }
      

      I think the root of problem is in HostAddress constructor

          /**
           * Creates a new instance of HostAddress.
           *
           * @param internetAddress The Inet form address
           */
          public HostAddress( InetAddress internetAddress )
          {
              addrType = HostAddrType.ADDRTYPE_INET;
              byte[] newAddress = internetAddress.getAddress();
              address = new byte[newAddress.length];
              System.arraycopy( newAddress, 0, address, 0, newAddress.length );
          }
      

      problem I see address type is not taken form provided parameter internetAddress, but hardcoded into IPv4 version HostAddrType.ADDRTYPE_INET

        Activity

        Hide
        elecharny Emmanuel Lecharny added a comment -
        Show
        elecharny Emmanuel Lecharny added a comment - Patch applied with http://svn.apache.org/viewvc?rev=1739708&view=rev Thanks !
        Hide
        elecharny Emmanuel Lecharny added a comment -

        Sure, will do ! Thanks a lot !

        Show
        elecharny Emmanuel Lecharny added a comment - Sure, will do ! Thanks a lot !
        Hide
        kwart Josef Cacek added a comment -

        Emmanuel Lecharny Could you review/merge?

        Thanks in advance.

        Show
        kwart Josef Cacek added a comment - Emmanuel Lecharny Could you review/merge? Thanks in advance.
        Hide
        mchoma Martin Choma added a comment -

        Yep, your patch works for me.

        Show
        mchoma Martin Choma added a comment - Yep, your patch works for me.
        Hide
        kwart Josef Cacek added a comment -

        Adding a possible patch.

        Martin Choma Could you try, if it helps to resolve the IPv6 issue?

        Show
        kwart Josef Cacek added a comment - Adding a possible patch. Martin Choma Could you try, if it helps to resolve the IPv6 issue?

          People

          • Assignee:
            Unassigned
            Reporter:
            mchoma Martin Choma
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development