# File lib/facter/util/ip/windows.rb, line 186 def self.valid_ipv4_address?(ip_address) String(ip_address).scan(/(?:[0-9]{1,3}\.){3}[0-9]{1,3}/).each do |match| # excluding 169.254.x.x in Windows - this is the DHCP APIPA # meaning that if the node cannot get an ip address from the dhcp server, # it auto-assigns a private ip address unless match == "127.0.0.1" or match =~ /^169.254.*/ return !!match end end false end