Skip to content

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

Merged
DavidS merged 1 commit intopuppetlabs:masterfrom
petems:MODULES-4485-improve_ip6_support
Mar 3, 2017
Merged

(MODULES-4485) Improve ipv6 support for type#731
DavidS merged 1 commit intopuppetlabs:masterfrom
petems:MODULES-4485-improve_ip6_support

Conversation

@petems
Copy link
Copy Markdown
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