# File lib/facter/util/ip.rb, line 268
  def self.get_interface_value(interface, label)
    if Facter.value(:kernel) == 'windows'
      require 'facter/util/ip/windows'
      return Facter::Util::IP::Windows.value_for_interface_and_label(interface, label)
    end

    tmp1 = []

    kernel = Facter.value(:kernel).downcase.to_sym

    # If it's not directly in the map or aliased in the map, then we don't know how to deal with it.
    unless map = REGEX_MAP[kernel] || REGEX_MAP.values.find { |tmp| tmp[:aliases] and tmp[:aliases].include?(kernel) }
      return []
    end

    # Pull the correct regex out of the map.
    regex = map[label.to_sym]

    # Linux changes the MAC address reported via ifconfig when an ethernet interface
    # becomes a slave of a bonding device to the master MAC address.
    # We have to dig a bit to get the original/real MAC address of the interface.
    bonddev = get_bonding_master(interface) if label == 'macaddress'
    if bonddev
      bondinfo = read_proc_net_bonding("/proc/net/bonding/#{bonddev}")
      re = /^Slave Interface: #{interface}\b.*?\bPermanent HW addr: (([0-9A-F]{2}:?)*)$/im
      if match = re.match(bondinfo)
        value = match[1].upcase
      end
    else
      output_int = get_output_for_interface_and_label(interface, label)

      output_int.each_line do |s|
        if s =~ regex
          value = $1
            if label == 'netmask' && convert_from_hex?(kernel)
              value = value.scan(/../).collect do |byte| byte.to_i(16) end.join('.')
            end
          tmp1.push(value)
        end
      end

      if tmp1
        value = tmp1.shift
      end
    end
  end