Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Jul 2013 12:22:32 -0700
From:      Douglas Thrift <douglas@douglasthrift.net>
To:        renchap@cocoa-x.com
Cc:        ports@FreeBSD.org, ruby@FreeBSD.org
Subject:   FreeBSD Port: rubygem-ohai-6.16.0
Message-ID:  <51EC34F8.70609@douglasthrift.net>

next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------020607020206010000040108
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Hello,

I have attached a patch for Ohai which fixes IP address detection when
there is an interface with no addresses such as ipfw0. I have already
submitted the patch upstream: https://tickets.opscode.com/browse/OHAI-492.

Thanks!
-- 
Douglas William Thrift
<douglas@douglasthrift.net>
<http://douglasthrift.net/>;

--------------020607020206010000040108
Content-Type: text/plain; charset=windows-1252;
 name="patch-lib__ohai__plugins__network.rb"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="patch-lib__ohai__plugins__network.rb"

--- ./lib/ohai/plugins/network.rb.orig	2013-07-20 23:51:57.000000000 -0700
+++ ./lib/ohai/plugins/network.rb	2013-07-20 23:52:07.000000000 -0700
@@ -42,6 +42,7 @@
   ipaddresses = []
   # ipaddresses going to hold #{family} ipaddresses and their scope
   Mash[network['interfaces']].each do |iface, iface_v|
+    next if iface_v.nil? or not iface_v.has_key? 'addresses'
     iface_v['addresses'].each do |addr, addr_v|
       next if addr_v.nil? or not addr_v.has_key? "family" or addr_v['family'] != family
       ipaddresses <<  {

--------------020607020206010000040108--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?51EC34F8.70609>