summaryrefslogtreecommitdiff
path: root/lib/ohai/util/ip_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ohai/util/ip_helper.rb')
-rw-r--r--lib/ohai/util/ip_helper.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ohai/util/ip_helper.rb b/lib/ohai/util/ip_helper.rb
index 044afaec..64360ace 100644
--- a/lib/ohai/util/ip_helper.rb
+++ b/lib/ohai/util/ip_helper.rb
@@ -21,8 +21,8 @@ module Ohai
require "ipaddress" unless defined?(IPAddress)
# Corresponding to RFC 4192 + RFC 4193
- IPV6_LINK_LOCAL_UNICAST_BLOCK = IPAddress("fe80::/10")
- IPV6_PRIVATE_ADDRESS_BLOCK = IPAddress("fc00::/7")
+ IPV6_LINK_LOCAL_UNICAST_BLOCK = IPAddress("fe80::/10") unless defined?(IPV6_LINK_LOCAL_UNICAST_BLOCK)
+ IPV6_PRIVATE_ADDRESS_BLOCK = IPAddress("fc00::/7") unless defined?(IPV6_PRIVATE_ADDRESS_BLOCK)
def private_address?(addr)
ip = IPAddress(addr)