diff options
author | David Schmitt <david.schmitt@puppet.com> | 2016-10-25 15:28:40 +0100 |
---|---|---|
committer | David Schmitt <david.schmitt@puppet.com> | 2016-10-25 15:28:40 +0100 |
commit | ea929418c6c539fe6aa6506e520c5fe8fe68559f (patch) | |
tree | b1492eaf80e23f7e4d8f12894baf6e1b7b171996 /types/compat | |
parent | 1e9128ffc890463880041690e508d7ac1d320ea5 (diff) |
(MODULES-3980) Fix ipv4 regex validator
This also updates all ipv4 tests to use the same test data for better
comparability. Closes #676, #679
Fix-Originally-By: Nate Potter <nathaniel.potter@intel.com>
Diffstat (limited to 'types/compat')
-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]+))?$/] |