lib/ohai/plugins/network.rb in ohai-7.0.0.rc.0 vs lib/ohai/plugins/network.rb in ohai-7.0.0.rc.1

- old
+ new

@@ -77,11 +77,11 @@ if gw_if_ips.empty? Ohai::Log.warn("[#{family}] no ip address on #{network[int_attr]}") elsif network[gw_attr] and network["interfaces"][network[int_attr]] and network["interfaces"][network[int_attr]]["addresses"] - if [ "0.0.0.0", "::" ].include? network[gw_attr] + if [ "0.0.0.0", "::", /^fe80:/ ].any? { |pat| pat === network[gw_attr] } # link level default route Ohai::Log.debug("link level default #{family} route, picking ip from #{network[gw_attr]}") r = gw_if_ips.first else # checking network masks @@ -154,10 +154,10 @@ ipaddress r["ip"] macaddress r["mac"] end elsif family == "inet6" and ip6address.nil? if r["ip"].nil? - Ohai::Log.warn("unable to detect ip6address") + Ohai::Log.debug("unable to detect ip6address") else ip6address r["ip"] if r["mac"] and macaddress.nil? and ipaddress.nil? Ohai::Log.debug("macaddress set to #{r["mac"]} from the ipv6 setup") macaddress r["mac"]