diff options
author | Sofer Athlan-Guyot <sathlang@redhat.com> | 2016-03-17 17:44:41 +0100 |
---|---|---|
committer | Sofer Athlan-Guyot <sathlang@redhat.com> | 2016-03-17 17:47:42 +0100 |
commit | 85e3c3e979be3dbfe98ce8a72b5a8cbf411102ed (patch) | |
tree | 71dd075e4cbd36327d4d1b93d8a8ff3c46b34b5a | |
parent | 4988d0fc359a59af6ce86c0beb8549a950df57cd (diff) |
Hack to fix IPv6 parsing in facter.
This kludge fixes the wrong regexp used in facter to report all IPv6
addresses.
While the upstream bug[1] is being work out, this should do the job.
Closes-Bug: 1558490
[1] https://tickets.puppetlabs.com/browse/FACT-1372
Change-Id: I85dabbd26bf8f25b2a03d22f547618b666421a83
-rw-r--r-- | lib/facter/netmask_ipv6.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/facter/netmask_ipv6.rb b/lib/facter/netmask_ipv6.rb index 5261485..598641f 100644 --- a/lib/facter/netmask_ipv6.rb +++ b/lib/facter/netmask_ipv6.rb @@ -8,6 +8,8 @@ def netmask6(value) end if Facter.value('facterversion')[0].to_i < 3 + Facter::Util::IP::REGEX_MAP[:linux][:ipaddress6] = + /inet6 (?:addr: )?((?!(?:fe80|::1))(?>[0-9,a-f,A-F]*\:{1,2})+[0-9,a-f,A-F]{0,4})/ Facter::Util::IP.get_interfaces.each do |interface| Facter.add('netmask6_' + Facter::Util::IP.alphafy(interface)) do setcode do |