integ/config/puppet-modules/puppet-stdlib-4.12.0/centos/patches/0002-Improve-ipv6-support-f...

21 lines
1.7 KiB
Diff

From 1385e617ddc9e82cc408c58bb1ae7cecbdf00465 Mon Sep 17 00:00:00 2001
From: Jack Ding <jack.ding@windriver.com>
Date: Tue, 15 May 2018 13:02:24 -0400
Subject: [PATCH] Improve ipv6 support for type
Fix from upstream 496d196 to add support for collapsed ipv6 address like 'abcd::3'.
---
types/compat/ipv6.pp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/types/compat/ipv6.pp b/types/compat/ipv6.pp
index 18b148d..8b82f1a 100644
--- a/types/compat/ipv6.pp
+++ b/types/compat/ipv6.pp
@@ -1 +1 @@
-type Stdlib::Compat::Ipv6 = Pattern[/^(?:(?:[\da-f]{1,4}:){7}[\da-f]{1,4}|((?:[\da-f]{1,4}:){6})(\d+)\.(\d+)\.(\d+)\.(\d+))$/]
+type Stdlib::Compat::Ipv6 = Pattern[/\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1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