diff options
author | Tim Smith <tsmith@chef.io> | 2020-07-22 13:05:51 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-22 13:05:51 -0700 |
commit | 3b7a9890cf1ce329747cabadb78c9f1eb83e7a29 (patch) | |
tree | 3dcae066522754d174f1dbe13c65d7257100bc96 | |
parent | 0a6530f2b7fdf225a7ca0ae54459cfce9b8d3b4c (diff) | |
parent | d06342586aabae25ab73d607b2ddf83efb28a2d4 (diff) | |
download | ohai-3b7a9890cf1ce329747cabadb78c9f1eb83e7a29.tar.gz |
Merge pull request #1477 from cooperlees/handle_both_uints
Handle IP to int conversion for inet + inet6
-rw-r--r-- | lib/ohai/plugins/network.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ohai/plugins/network.rb b/lib/ohai/plugins/network.rb index 03003eb2..8e9425ef 100644 --- a/lib/ohai/plugins/network.rb +++ b/lib/ohai/plugins/network.rb @@ -54,7 +54,7 @@ Ohai.plugin(:NetworkAddresses) do ipaddresses.sort_by do |v| [ ( scope_prio.index(v[:scope]) || 999999 ), 128 - v[:ipaddress].prefix.to_i, - ( family == "inet" ? v[:ipaddress].to_u32 : v[:ipaddress].to_u128 ), + v[:ipaddress].to_i, ] end end |