diff options
author | Hunter Haugen <hunter@puppet.com> | 2016-10-25 10:52:45 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-25 10:52:45 -0700 |
commit | 4b15c970f5ac6bc683cfde32d782f51a63bee867 (patch) | |
tree | b1492eaf80e23f7e4d8f12894baf6e1b7b171996 /types | |
parent | 1e9128ffc890463880041690e508d7ac1d320ea5 (diff) | |
parent | ea929418c6c539fe6aa6506e520c5fe8fe68559f (diff) |
Merge pull request #680 from DavidS/modules-3980-fix-ipv4-regex
(MODULES-3980) Fix ipv4 regex validator
Diffstat (limited to 'types')
-rw-r--r-- | types/compat/ipv4.pp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/types/compat/ipv4.pp b/types/compat/ipv4.pp index 1d72ebd..a0ba0d6 100644 --- a/types/compat/ipv4.pp +++ b/types/compat/ipv4.pp @@ -1,2 +1,2 @@ # Emulate the validate_ipv4_address and is_ipv4_address functions -type Stdlib::Compat::Ipv4 = Pattern[/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/] +type Stdlib::Compat::Ipv4 = Pattern[/^((([0-9](?!\d)|[1-9][0-9](?!\d)|1[0-9]{2}(?!\d)|2[0-4][0-9](?!\d)|25[0-5](?!\d))[.]){3}([0-9](?!\d)|[1-9][0-9](?!\d)|1[0-9]{2}(?!\d)|2[0-4][0-9](?!\d)|25[0-5](?!\d)))(\/((([0-9](?!\d)|[1-9][0-9](?!\d)|1[0-9]{2}(?!\d)|2[0-4][0-9](?!\d)|25[0-5](?!\d))[.]){3}([0-9](?!\d)|[1-9][0-9](?!\d)|1[0-9]{2}(?!\d)|2[0-4][0-9](?!\d)|25[0-5](?!\d))|[0-9]+))?$/] |