summaryrefslogtreecommitdiffstats
path: root/lib/facter/util/ip.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/facter/util/ip.rb')
-rw-r--r--lib/facter/util/ip.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/facter/util/ip.rb b/lib/facter/util/ip.rb
index 62d50a4..23eeb9c 100644
--- a/lib/facter/util/ip.rb
+++ b/lib/facter/util/ip.rb
@@ -6,17 +6,20 @@ module Facter::Util::IP
REGEX_MAP = {
:linux => {
:ipaddress => /inet addr:([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/,
+ :ipaddress6 => /inet6 addr: ((?![fe80|::1])(?>[0-9,a-f,A-F]*\:{1,2})+[0-9,a-f,A-F]{0,4})/,
:macaddress => /(?:ether|HWaddr)\s+(\w{1,2}:\w{1,2}:\w{1,2}:\w{1,2}:\w{1,2}:\w{1,2})/,
:netmask => /Mask:([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/
},
:bsd => {
:aliases => [:openbsd, :netbsd, :freebsd, :darwin, :"gnu/kfreebsd"],
:ipaddress => /inet\s+([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/,
+ :ipaddress6 => /inet6 ((?![fe80|::1])(?>[0-9,a-f,A-F]*\:{1,2})+[0-9,a-f,A-F]{0,4})/,
:macaddress => /(?:ether|lladdr)\s+(\w?\w:\w?\w:\w?\w:\w?\w:\w?\w:\w?\w)/,
:netmask => /netmask\s+0x(\w{8})/
},
:sunos => {
:ipaddress => /inet\s+([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/,
+ :ipaddress6 => /inet6 ((?![fe80|::1])(?>[0-9,a-f,A-F]*\:{1,2})+[0-9,a-f,A-F]{0,4})/,
:macaddress => /(?:ether|lladdr)\s+(\w?\w:\w?\w:\w?\w:\w?\w:\w?\w:\w?\w)/,
:netmask => /netmask\s+(\w{8})/
},