Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(MODULES-4485) Improve ipv6 support for type #731

Merged
merged 1 commit into from
Mar 3, 2017

Conversation

petems
Copy link
Contributor

@petems petems commented Mar 3, 2017

  • Improves regex to catch some valid (but less
    known) ipv6 strings, mostly those which are a mix
    of ipv6 strings and embedded ipv4 numbers
  • Regex inspired by the following:
  • Whilst we're here, we can add the more tricky
    ipv6 strings to the existing functions to validate
  • Luckily, the ipaddr native ruby library used
    in the original functions already supports these

* Improves regex to catch some valid (but less 
known) ipv6 strings, mostly those which are a mix
of ipv6 strings and embedded ipv4 numbers
* Regex inspired by the following:
	* https://github.com/sindresorhus/ip-regex
	* https://gist.github.com/cpetschnig/294476
	* The original Dartware forum thread where 
someone originally created this beast of a regex,
now lost except to archive.org
* Whilst we're here, we can add the more tricky
ipv6 strings to the existing functions to validate
* Luckily, the `ipaddr` native ruby library used 
in the original functions already supports these
@DavidS DavidS merged commit 9e28f8f into puppetlabs:master Mar 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants