summaryrefslogtreecommitdiff
path: root/lib/ohai/plugins/linux/network.rb
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-08-10 11:22:27 -0700
committerTim Smith <tsmith84@gmail.com>2020-08-10 11:22:27 -0700
commitf2dfd4a8f3b6bf4bce6cbd60ca228ff41cf2225e (patch)
treed5be36e946dfec50d5cd02b72fb8c820c6f9d913 /lib/ohai/plugins/linux/network.rb
parent23cf5e3f6ae625a13ce198076b01f8ed249ec20d (diff)
downloadohai-fix_require.tar.gz
Update network plugin to use ipaddr not ipaddress gemfix_require
This broke because we never actually required ipaddress in the plugin, but the specs passed because we required it there. Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib/ohai/plugins/linux/network.rb')
-rw-r--r--lib/ohai/plugins/linux/network.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ohai/plugins/linux/network.rb b/lib/ohai/plugins/linux/network.rb
index b38df361..54523e11 100644
--- a/lib/ohai/plugins/linux/network.rb
+++ b/lib/ohai/plugins/linux/network.rb
@@ -518,8 +518,8 @@ Ohai.plugin(:Network) do
return false if default_route[:via].nil?
- dest_ipaddr = IPAddress(route[:destination])
- default_route_via = IPAddress(default_route[:via])
+ dest_ipaddr = IPAddr.new(route[:destination])
+ default_route_via = IPAddr.new(default_route[:via])
# check if nexthop is the same address family
return false if dest_ipaddr.ipv4? != default_route_via.ipv4?