Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-6682

NetUtils:normalizeHostName does not process hostnames starting with [a-f] correctly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.22.0
    • io
    • None
    • Reviewed

    Description

      public static String normalizeHostName(String name) {
      if (Character.digit(name.charAt(0), 16) != -1) {
      return name;

      This code is attempting to short-circuit the hostname->ip resolution on the assumption that if name starts with a digit, it's already an ip address. This is of questionable value, but because it checks for a hex digit, it will fail on names starting with [a-f]. Such names will not be converted to an ip address, but be returned unchanged.

      Attachments

        1. HADOOP-6682-Y20.patch
          0.6 kB
          Jakob Homan
        2. HADOOP-6682.patch
          0.6 kB
          Jakob Homan

        Issue Links

          Activity

            People

              jghoman Jakob Homan
              jghoman Jakob Homan
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: