Uploaded image for project: 'Commons JCS'
  1. Commons JCS
  2. JCS-131

AddressUtil.obtainFinalThreeDigitsOfAddressAsString does not allow for IPV6

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • jcs-2.0-beta-1
    • None
    • None

    Description

      AddressUtilTest is failing on Jenkins/Continuum.
      The problem appears to be that HostNameUtil.getLocalHostAddress() can return an IPv6 address which does not have the expected format.

      INFO [AddressUtil] - <obtainFinalThreeDigitsOfAddressAsStringLookup running; ipstring [fe80:0:0:0:221:5aff:fee0:c355%2]>
      WARN [AddressUtil] - <could not find a . in address: fe80:0:0:0:221:5aff:fee0:c355%2  returning default: 000>
      

      The String only appears to be used in KeyGeneratorUtil.generateRequestId().
      This will be passed "000" if AddressUtil fails.

      Possible fixes:

      • change AddressUtil to handle IPv6 (I assume it must return digits)
      • change AddressUtilTest to ignore the failure if the local address is IPv6

      Attachments

        Activity

          People

            tv Thomas Vandahl
            sebb Sebb
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: