summaryrefslogtreecommitdiff
path: root/lib/ohai/plugins/ip_scopes.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ohai/plugins/ip_scopes.rb')
-rw-r--r--lib/ohai/plugins/ip_scopes.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/ohai/plugins/ip_scopes.rb b/lib/ohai/plugins/ip_scopes.rb
index 4d8d61d8..045e7897 100644
--- a/lib/ohai/plugins/ip_scopes.rb
+++ b/lib/ohai/plugins/ip_scopes.rb
@@ -32,7 +32,7 @@ Ohai.plugin(:IpScopes) do
begin
attrs["ip_scope"] = address.to_ip.scope
- if private_addr?(address) && !tunnel_iface?(interface)
+ if private_addr?(address) && !tunnel_iface?(interface) && !ppp_iface(interface) && !docker_iface(interface)
privateaddress(address)
end
rescue ArgumentError
@@ -51,7 +51,15 @@ Ohai.plugin(:IpScopes) do
address.to_ip.scope =~ /PRIVATE/
end
- def tunnel_iface?(interface)
+ def ppp_iface?(interface)
interface["type"] == "ppp"
end
+
+ def tunel_iface?(interface)
+ interface["type"] == "tunl"
+ end
+
+ def docker_iface?(interface)
+ interface["type"] == "docker"
+ end
end